Justin, what you are describing are not flatworms, they are bristle worms...and they are good for your tank. Flatworms are tiny reddish brown planaria about 1-2 mm long. They almost look rectangular. You will notice them forming matts along the edges of your rock work.
Bristles worms on the other hand, are long reddish worms that for the most part are awesome for your tank. They eat detritus and stir the sand. Occasionally you'll get a bad one that might eat a snail or clam, but these are not all that common.
I think you killed a whole lot of rock for nothing...
