Code structure reorg