removing superfluous code and paths.