Removes redundant local variables