Revamped XML for the last time, and added ability to save XML.