Fixed a range of jshint issues