Extremely dubious refactoring