Rebase of Wip 5374 against master