code review and refactor

Coming like ... NOW!