moved some quick/insertion sort code to sort.h