add jshintrc and fix errors