Remove a number of unused variables, no bug