Fix compilation issues due to renaming.
WIP: reinstate unit tests.