more code cleanup from code review