Add JSHint and fix lint errors