Adding in jshint to check code, and fixed up a bunch of reported errors