fix various jshint issues