Sort events chronologically
Properly hide modal, properly this time