Refactoring and extending with new structure