Iterators

Updating the old iterators branch from the Mercurial repo.