Dependency refactoring