clean up of graph.