Cleaning up and adding xmldoc