Updated dependency injection