Add jshint task and fix some jshint warnings