cleanup & reorg