Huge improvement on sorting.

Optimized sorting to be ~35x faster then regular quicksort.