Localise some variables and clean up finished timers better.