Contract dependency injection almost working