Added support for creating templates from strings