Refactoring struct