Fix all jshint style and syntax complaints

- Add a small Makefile with a check target that runs jshint on all .js files
- Fix all jshint complaints