fixed computation of io times + misc code cleanup