Converting to timeline data structure
Reworked to use a timeline data structure