Compact refactoring