Fix jshint errors

Additionally fix tests