Remove unused variables and assignments