Fixed the timing mismatch and cleaned some unnecessary code.