Fixed a good chunk of jshint warnings