updated the structure of the contact email
added some docstrings and comments