FIX: Crash in some cases
FIX: Heap allocation error
CODE: Remove extraneous debugging information (the cause of the above heap allocation error) from the sort algorithm