Remove dead code and unused imports.