Fixed errors in jshint
Some more fixes
Added jshinting to test and server side files.
Fixes some more jshint errors in files. Added globals mocha and mochaPhantomJS in jshintrc.