Fixed JSHint errors so that it can be turned on in Travis
Merge pull request #723 from wibblymat/jshint-fixes

Fixed JSHint errors so that it can be turned on in Travis