Added unit test framework and started to write unit tests.