Made Day, in the lapply function, a sortable data frame then sorted it by hour. Also added a few more comments for better readability