Add shared, similar email address handling. And add comments to existing functions