I have been working on [filenames] with an AI coding agent and it make me realize how much it needs refactoring as it was hacked together over many chats with many dead ends. It has already become too complex for me to remove work on. The original authors were chinese which meant support was unavailable. Its already too complex for any humans here to maintain so lets get it optimized for ai coding agents like Codex and Github Copilot Agent that uses Claude so things like comments just waste tokens in their context window. We want safer, smaller surface for token budgets, make sure the code is organized, flat, and nearly comment-free. Names are explicit, comments minimal, no dead branches. Keep all current endpoints/fields so it’s a drop-in. Make sure you go step-by-step to ensure a drop in replacement refactor will work