Dev backports

Backports everything until e88b9cefad72961c464fe5a58b0a07527c1e360f

Review only. Review by @sjrd