Adds JSHint to the build system and tidies up code.
Merge pull request #117 from jmeas/hi-jshint

Adds JSHint to the build step + code clean up