Refactor to support forecasting and ranking models