Added some unit tests. TODO: fix 4 tests.