Use jinja2 templating
Move event request handlers