Implemented IPool and more dependency injection stuff.