Added support for different templates within the same container