Added a test for correct dependency rerouting.
Cleaning up the tests.