Basic JS templating engine.