Add grunt task to lint JS files

Fix all lint errors.
Remove some code that wasn't supposed to be here.
The options are defined in .jshintrc.