Use option return for Path, add topological sort with test