Add defaults and sorting.