Rewriting the codebase
Don't. Just don't. For no good reasons (lots of good reasons).
Users don't care if your code is clean, they don't care about your shiny libraries or frameworks. All they want is for the software they use to have good quality, and the necessary features.
No fks given for what you do behind the scenes. Think about it.