Adding dependency injection to the Application class.