Preliminary graph structure. Needs full comments.