merge tree completed
substitution leaf rule update -> now support correct type substitution
templates cleanup