Added unit testing through QUnit