Add mailer, jinja, stats handler + small improvements