Fixes to have first version of refactored modules compiling.