Remove unnecessary variables, methods, and class imports.