Removing unused variables and imports