Add tests for iterators
Fix a couple of tests