General cleanup and tweaks.