Added Template Inheritance code