Refactored: Factorified DiffIterator.