removes unused variables.