#261 Initial run-mail and refactorings