If you can’t maintain it, rewrite or refactor it. I used to make a lot of the same mistakes with LibreKitten, but I learnt, and now I don’t do it anymore.
I personally can still maintain LibreKitten. However, I am currently in the process of refactoring the server code, because it is a mess.
I haven’t really looked at the AmpMod codebase too deeply. But I do have one suggestion, write automated tests, at least for the VM. It will help you not accidentally cause a bug, even the existing tests will help!
If you’re not starting from scratch, you may need to fix your code (or the tests) to get them to pass.
That’s all I have to say.