Minor cleanup + add utility function to Digraph.