Diverse small fixes and improvements.