Various cleanup and improvements for reliable delivery.