Add .jshintrc and fix some warnings