Refactoring woes