Code cleanup arising from code review