Refactore after refactoring the ORM integration.