Iterator almost completely functional

Need to make it differentiate between types, as well as some other
things