Minor simplifications and improvements