added jshint to grunt task and removed most jshint errors in code