comments and refactoring from code review