Merge templates