Enhancements for sub-assemblies, separate templates and updated tests

Thanks,
Fixed.