Address code review feedback, and minor code cleanup.