Adding multi-template-category support