Added .jshintrc and fixed a few errors.