Adding dependency injection