Remove unused imports, variables, and private methods