Update templates.js

Prefer this way of creating templates TBH.