Javascript extendible templating engine