We have the time now for refactoring ... or we'll add a ticket to the backlog, etc.
Second, everyone looks at some code, wonders what idiot did this ... and at some point discovers it was themselves x months/years ago. If you're the primary coder, you'll be getting this a lot. Accept that you've learned and improved since then.
Hope this helps.