Why making the class depend on the whole container instead of following the DI pattern (which is what the current code is doing) ?