Added JSHINT and fixed jshint warnings