Use jshint and fix errors