Fix timing, and remove superfluous code