optimisation: now using pointers instead of objects in stl containers
refactoring: renames nodes to nodeMap + added a getNodeSet() method
forgot to adapt the output for pointers