Client templates

Introduced client templates (pure JavaScript).