some cleanup, working on an iterator idea