Clear XML and bugfixes