Minor tests and improvements