Rebase recent updates to version2 branch.