Refactored a bit.
Rework e-mail parser.
Add a few new tests.