Please be careful dosing the flatworm exit, when they die they release toxins and you must be prepared for this or you can lose everything in the tank. There are specific instructions that have to be followed to help prevent this. You must siphon out as many as possible first, treat, siphon out the dead ones, and then a large water change. You need to be running fresh carbon to help absorb the toxins as well. Please don't take this lightly, there are many people that lost their enitre tank using flatworm exit. It is no the flatworm exit that is the problem, it is the dying worms. The more severe the infestation the more of a chance this could happen.
The reason why there are so many flatworms (I'm assuming planaria since you can actually see them, AEFW are usually invisible on corals) is because there is food for them. You remove the food source then the flatworms start to die off. I had them in my tank when it was new and I almost took my chances with the flatworm exit but decided no to at the last minute. After a month or so they just dissapeared...I'm still not sure exactly why. Something must have changed in the food chain changed and I assumed they starved. Today I can't find a planaria in my tank if I tried and 6 months ago I had thousands. I think that the tapwater is ultimately to blame supplying food to algae perhaps that is feeding the worms, not sure.
Please do lots of research on flatworm exit before you use it!