code structure cleanup