Added QUnit and more tests