Code structure cleanup