Created a sort_menu function, added new (S)ort menu option, deleted 79 line