Template engine for javascript