Added nested classing in templates