Semi-final changes for 4.1

The api shouldn't change much (if at all) between this commit and the
release of 4.1.