Refactor email preferences