Remove unnecessary local variables