The cleanup messy code icon does exactly that: it cleans up messy code. It removes extra or redundant HTML tags within the code. All you need to do to use it is click it.
Copy over some text that looks really strange? Accidentally change some formatting and didn’t mean to? That’s what the Remove Formatting Icon is for. It simply reverts everything in your article to plain text. Then you can either leave it, or change it to what you want it to be from a blank slate.