Refactoring emails