Changed to use references instead of standard objects. This fixes the graph.