Improvements to templates to have more accurate timings.