Several tweaks and improvements.