updated test script and fixed jshint errors