Cleanup of logic/XML.