Monster cleanup: Remove unused classes and simplify logic.