Free graph data, remove debug messages.