3.0 and partial 3.1

Adding changes made during migration to 3.0 to the github
repo.  Part of the revisions for 3.1 also included here. (I didn't
create an archive for 3.0 apparently…)