Some speed improvements. Especially simplifying the contour before the
computations brought the whole tracking sequence to lower than 6% of the
whole running time.