iterator refactoring, helpers
dead code
cleanup