Clean up the templates markup

Fixes #158