clean up on the xml and reformat