Clarified tempo computation code a bit.