Merge in master branch

This should correctly resolve merge conflicts from the master branch and import all the changes.