clean up xml generation