Refinements to timer &  output compare setup. Still not tested.