Fix tests, re-add default sort implementation