general structure cleanup