Attempt #1 to improve CodeClimate score.

* Try some changes to see if CodeClimate no longer things there are instances of 'duplicate code'.
Merge pull request #48 from theckman/codeclimate_refactor

Attempt #1 to improve CodeClimate score.