Bloody refactoring.