Use tsort for topological sorting (massive speedup)
Merge pull request #13 from mwylde/feature/faster_topological_sort

Use tsort for topological sorting (massive speedup)