XML cleanup