removes unused variables