Flatten single-element arrays
Properly handle sort direction field names
Allow for non-resolved resource links