Refactor templates (remove the need for Java code)

No Java code should be required to define a new template. It should be possible to add a new template just by placing a file under templates/ with a special format (probably .yml).