Move some code out of line. No functionality change.