jshint errors corrected