added jshint and fixed any errors