Several small fixes.

Opening a PR for a bunch of small fixes so that they get reviewed.
Sure, that's fine too.  It was just to ensure sanity.