Complete rewrite of the timeline functionality