reorg tests and various cleanup