More minor fixes/tweaks

Fix assorted minor bugs, tweak a few things.