Starting to clean up the IoC container definition a bit more

Basically just trying to make it a bit smarter on registration of
objects. This means that I have to change the interface a bit and I will
most likely have to drop support for some IoC containers...