Finished topological ordering. Changed clean method to rename and remove only after topological ordering is determined.