Merge in some recent work of mine.