Add jshint and fix jshint errors