fix up some jshint warnings, and a few other minor things