When refactoring an existing product, don't try to make it perfect.
A successful product tends to grow organically in very messy ways that accumulate debt.
It's hard to pay down that debt continuously, so it often accumulates into a big pile until something simply must be done.
In that project to fix it, it's tempting to figure out the perfect, decade-durable version and implement that--who knows when you'll get to tweak it again.
But that machined perfection is extremely hard to retrofit onto a messy, living thing (especially one that's not staying still!)
It's easy to get into a trap of going into a cave to try to get the plans perfect.
It's much better to do small, almost-certainly-a-good-idea improvements continuously.