Remove some unused variables in functions.