Lots of jshint fixes