Remove unwanted custom parts from xml file, and leave only cache/debug flags