Mustache templating. Some refactoring.