Added simple test, fixed jslint errors