remove dead and superfluous code