Updated Grunt and refactored Gruntfile.

Also changed .jshintrc predef to globals.