Moved split emails into its own function
Deleted unnecessary tests, fixed bug on the split emails