Remove unneeded variable assignments.