Address code review comments.

1 job for rewrite-memory-profiler in 11 minutes and 1 second (queued for 19 seconds)