fixed most jshint warnings