Remaining merges of pull requests from master

The remaining changes made on master after the new infrastructure was forked.