Misc tweaks and improvements.