Some misc. tweaks and fixes