Iterator and headers refactoring