Rewrote timeline control to improve performance.