You'll also want to fix the vents from the inside out. When you wash the vents, look to see if there are any sores, or grey/black waxy rings around the vent. ATreat the sores with neosporin after cleaning them well. Then pat the vent with corn starch or plain baby powder to dry and cool the area (and keep flies from being attracted - they lay maggots in nasty rear feathers). Do daily as necessary.
Then if you worm them, please only worm with Wazine 17 (piperazine 17) the first time. I would wait a week before you do that. These birds could have heavy parasites and worming with a more broad spectrum wormer the first time could stress them to illness. Wazine has enough strength to expel adult roundworms and already make a difference. Then in 2-4 weeks, reworm with a more broad spectrum wormer like one of the following: fenbendazole (SafeGuard paste for horses or liquid for goats), 5% pour on ivermectin for cattle (pm for dosage), levamisole, albendazole. I tend towards fenben for this as some sites say it can possibly be effective towards tape worms. It's very safe, very hard to over dose, very easy to give. 1 BB sized bit of the horse-paste (SafeGuard 10% fenbendazole) in their beaks.
I'd dust for lice/mites whether or not they have them. Permethrin dust is what to use - it's safe, very effective, and comes in a shaker can. read the active ingredient of products that say "poultry dust", "poultry and garden dust", "livestock lice powder", etc. Make sure it's permethrin. You can even treat their bedding in the new pen - stir the powder in - just in case.
Then yogurt for a week, daily - rebuild their digestive bacteria to help fix the diarrhea. It would really help if they had organic apple cider vinegar in their water (1 tablespoon per gallon) for a week, and of course good complete feed - laying crumbles or pellets. Slowly introduce grit and free choice oyster shell to them - so that they don't hog it down. Who know what they have and haven't had to eat.
The OACV (not regular, but organic) will help adjust the pH to correct if there's a yeast infection from their bad care (common with the pasty vent). The Yogurt has live bacteria that also helps fight yeast, bad bacteria, etc.
You can even mix Lotrimin (athelete's foot creme) and neosporin and smear that into their treated bottoms well. I'm certain there's bacterial and yeast issues from sitting under the wet droppings in the heat. That's a good way to do it and then use the cornstarch. Then on top of that, make sure that when you dust them the permethrin dust goes there - over the dressing and powder.
They're lucky to have you!!