Refactoring question