further code structure cleanup