Precompiled the templates

Removed the templates from the `<script type="text/template">` tags into
their own files, then precompiled them using `grunt-contrib-jst`.