Added unit test case set up

Added QUnit set up and few basic test cases. This can be expanded to cover all the different methods/functions.

Also modularized the code into src and test folders for maintainability.

Attaching screenshot of the validity test suite execution. Please check