Sorted dates and first version of the final data structure