Better datetime handling and always sorted