Sequence iterator + refactoring.