Finished refactoring foundations from RM21 to NVCad