Adds a sort function for loading domains.