Remove unnecessary local veriables