More tidying of graph creation.