Various tweaks and improvements.