jshint errors rectified