Added debug logging.
Removed redundant xml.