Various cherry-picks from the TDR branch
this commits can be merged in master straight and should not wait in the TDR branch, making is bigger than it should
this commits can be merged in master straight and should not wait in the TDR branch, making is bigger than it should