Changed sort functions visibility.