Backport some things from develop-frontend. (@Hodgestar)