Massively refactoring `CompiledModel` stuff