Starting to hack out topsort integration (WIP)
Add a quick and dirty top-sort
cleanup resolution, fix edges
Remove comment; topsort should handle this.
Add some docstrings.
Add some comments to explain what's going on.
Clean up edge code.
Document the leaf process a bit better.
Add better checking when pruning.
Change logic to not check twice.
Merge branch 'master' into topsort