Work in progress on making function for evaluator.
Need to locate topological sort routine and test the code.