Minimal refactoring