Refactoring to prevent circular imports