Bugs in the XML parsing fixed
Removed some debug output