Changed the sorting algorithm used during the display algorithm so it
can handle biiiiiig graphs