Replaces graph.cpp