Misc. cleanup and tweaks