Sync up changes from Peter's repo to the main one.

These two repos have started to drift. To make it easier for people to contribute, we need to keep them in sync.