Rewrite of graphviz code to make more complex things possible