cherry-pick from master and small cleanups/fixes

Let me know if you want me to take out the translations.