Improvement to output graph.
Bug fixes.