Refactor: fix code smells

Code climate suggested a few minor changes to improve code quality.
Add code-climate badge to README.md.