Some structure refactoring