Doing filtering and ordering in the backend instead of the frontend, fixes some bugs with ui-sortable