Completed further refactoring of CK4.