Misc fixes

Here's another branch for you to review and possibly pull.  It contains a small collection of miscellaneous fixes.