Refactoring infrastructure