Added code for QUnit tests. All the code for the tests has been stored in the tests/ directory