Fix minor bug in TextFormatter.
Create dependency injection for async-predictor.