General fixes and improvements.