Refactor action helpers + some logging
Finish off logging and error handling of emails