fixed a lot of the jshint complaints; the remaining ones we should probably figure out how to annotate to remove the warnings