Use std::map for node lookups

This causes my mapping algorithm to run about 100x faster (which is
expected -- it goes from linear lookups to log lookups).