Fix jshint errors

Added a dev dependency of `jshint`, which required an upgrade to `grunt-contrib-jshint`. Then I fixed a couple of jshint warnings. The unit tests still pass.