Get rid of unnecessary local variables