Refactoring and design