Add graph-drawing code