Merge new changes from Richard