Adding tests and an immutable iterator.