Experimenting

As improved by @aronadaal, nodes are stored in a dict with replacement for a list, which gets a speed-up of degrees when indexing.