Upgrading the dependency traversal algorithm. Still one test failing