Refactor email predictor