Add jshint and fix jshint reported issues