Refactoring design