Refactored graphviz cleanup, graph generation