Lots of fixes to instruction cycle counts