Added QUnit tests
Minor change
Solved issue#1 and added more tests