improved unit test coverage of critical modules