Clean code and add integrations

This cleans up code for CodeClimate as well as adding build integration with Travis CI and code analysis with CodeClimate.