Topographical Sort

Implemented topographical sort. Concurrent execution not yet
implemented.