Process code review comments. Mostly code cleanup, no design-related changes.