Remove unneeded local variables