Add support for templates in --stateless mode, increased number of templates.