refactoring interface design