Improvements to graph builder.