Clean up XML code
Fixing System.Xml.XPath.XDocument implementation