Added unit test framework and tests.