Improve code quality

* I ran the repo through the automated code checker on codeclimate.com
   - It made some worthwhile suggestions and interesting observations (and some I don't neccessarily agree with)