Refactoring the structure