Primitive reference doc improvements

This is small.  Merge #1787 first.

For #1203 and #1724.