Try to cover more functions with unit tests.