Upstream master

Mix our changes with upstream improvements