Add a .jshintrc file and fix a few related errors