Rewrote the calculate digraph function and reweighted things.