Merge "One-pass rate control cleanups/fixes/refactoring"