Fixes to various jshint warnings