added jshint and fixed errors - #49