remove unused variables and imports