Added jshint in the build cycle; fixed some Javascript errors