More XML bugfixing
More work, debugging