Fix basic jshint errors

This change only contains the basic fixes. I send this first so it's seperated from the commits where variable assignments are modified. (see `grunt jshint:lib`)

I've seperated the lib_test grunt task into lib and test, so it's now possible to do `grunt jshint:lib` and `grunt jshint:test`. `grunt jshint` will try to validate all files.

This pull request does not contain jshint fixes for the test/ directory yet.