Implemented and tested topological sort for determining files for classes.