Misc small fixes/cleanups