Topological sorting v1 (no test yet) + comments