Moved sorting and drawing functions to HeapSorter class, reworked image sizing to pick smallest possible size