Sort methods and add inline docs