Refactoring: less ugliness.