Minor code reorg