WIP on code reorg