Added jshint as mocha test and fixed various jshint related issues.