Improve code quality

* I ran the repo through the automated code checker on codeclimate.com
   - It made some worthwhile suggestions (and some I'm not so sure about)