add jshint and fix linting errors