Various fixes from this morning's review.

And also a stab at fixing [temp.friend].