Refactoring helpers