Rebased patches to master