Translate templates to Mustache

Mustache's syntax is simpler and cleaner, but a little less powerful. Some templates haven't been tested because there are no test cases for them.