Added TODOs
Set sorted-by and direction instead of removing them if there is an error