Some cleanup and reorg