Refactor.
Mail notifications.
Cleaned up config, added doc/link.