clean up old code based on config.xml