Misc. fixes and tweaks.