Update template.coffee

Fixes #7 & #8