after a lot of debugging, nodes are now managed in std::maps instead of vectors. Next step: edges