removes superfluous code