Fix for re-rendering timeline.

Added some cleanup to allow for re-rendering a timeline on a given
page when the number of slides changes.