Fix jshint warnings

I run `grunt check` and I saw a lot of jshint warnings, I'd like to put fixes for them into this pull request.

Note: merge this pull request only after every warning has been removed.