In this thread here on MobileRead there is an attachment for InterParse4.
InterParse4 has a bit of a strange interface, but once you understand it, you can do a LOT with plain text. It's designed to help you do exactly what you are asking about. It has a backout feature (like undo) that lets you experiment.
It comes with quite a number of fixes built in.
m a r