Misc tweaks and fixes