Code reorg a bit.