* Refactor email processing (to be continued)
* Fixed minor bugs