Marty I’ve had issues with foam, a filter using sawdust has worked very well for Matt.
He suggests to put hay or pine straw or some other loose media at the bottom and then put the sawdust over that. The outlet has a screen to prevent the engine sucking in sawdust.
Also for moisture, maybe it would benefit you to add a condensate gutter to the hopper for excess moisture to leave. It also will help if you decide to run it as raw wood.
One more thing about your cooler, in that vertical style it’s best to run from bottom to top, moisture will drip down and rinse the pipes as it condenses.
As for your grate, how far is the distance between the bars of the grate, or size of the holes? I think with the size range we use here 3/8" gap is sufficient for engine grade charcoal.
The distance of the burn depends on how hard your engine or blower is pulling on the gasifier. I want to say if you see it actively burning at the grate you’re over pulling it, you want a distance of charcoal where the oxygen has been totally consumed and can scrub the gas.