Generic graph structure using a single object for both graph and node behavior.