Tidied up the XML exportation