Abstract dependencies to make it easier to test.