major code reorg