XMLSaver impl and other general fixes.