Graph::sortGraph() should be finished.  haven't tested it yet, but looks correct.