Simplify graph.h