IOC Container

I am not sure that I will continue to use an IOC container. The cost is small as AutoFac is quite low-ceremony but the reward is small too.

The commit also includes various (incomplete) refactorings.