Main work completed.
Added few unit tests, now need to debug the code.
Current results: 2 tests passed, 3 failed.