First start writing automated tests, for example Selenium & unit tests. You'll learn what all the code does, you'll learn a new skill, you'll have a safety net of regression tests for rewriting the code, and you'll be adding value to the company. If you have good test coverage, you'll be able to rewrite the code very quickly. There are a ton of resources for how and why to do testing. One that stands out in my mind is SQLite. They've talked about being able to refactor the core of their engine in a weekend, only because they had the test coverage to know they did it right. https://www.sqlite.org/testing.htmlhttps://www.youtube.com/watch?v=WslnuNZ3T5whttps://youtu.be/giAMt8Tj-84?t=32m35s