Lint police

Fix lint errors.
Add jslint pre-commit hook.
Maybe use `process.env.WERROR === true` (an analog to `-Werror`)?