Introduced node iterator; refactoring