Added jshint & fixes for jshint errors