Move templates into coffee.
Add some simple tests.