Mainline integration

I know there is a bit more work to do, but I'm going to use this snapshot to prepare our codebase. There is pressure to release the fix for the shift slowness immediately.