Added 'nextNode' and 'nextEdge' commands for iterating through all nodes
in a CLI-based manner.