Refactor main() to be method called from __main__
Add email cleanup.

Remove 'mailto:' if at the beginning of an email address.
Also introduce and add some tests.