fixed many jshint warnings