moving templates to templates.js file so they can be inculded easily without being shuffled around in a bunch of esoteric <script> tags. seems to be working fine, at first glance.