Refactoring iterator support.