Adding support of templates #1