Codeclimate

Refactoring to improve future edit-ability. Code Climate score D => A.