tidying the xml files