Added two test cases.
Reorganized code for better project layout. Refactored JS to use simple module pattern.