Use jshint, clean up tests r=mikedeboer