Huge structure refactoring