xml template improvements