Fooling around with more XML prettification and consolidation of templates