Code review - see comments and refactor