Moved some of the Graph construction to the correct place: the Graph class.