added jshint and fixed some lint errors