Fix compilation and unit test problems from refactoring.