Reorganize unit tests plus increase test coverage.