Added Qunit test framework

Added test framework , updated the test framework . Refactored the code
.