Refactoring struct data