jshint/ unit test fixes