Allow dependencies to be overridden

This adds more flexibility to the system.
Tidy up dependency API

Now it's all within an object.
Document dependency configuration