Updated unit tests and fixed jslint