nodes and edges now use std::maps instead of vectors for management