Added lines to clean up input XML data before it is then processed.