I have an experience similar to yours where I maintained a codebase over multiple years and I went to the rewrite route three times... I faced the same problems over and over again. Then I realized that the only way that I have found to be really efficient to maintain and evolve a codebase is to write automated tests suites.
With automated tests suites you can refactor the code, clean it and make it better, simpler, because you no longer fear of breaking anything.
Have you tried it ? :)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.