Added a contract test for iterators and immutable iterators, used that where needed.