Minor code reorg.