Added jshint to dev setup + cleaned up code