Add sorting

For now a simple quicksort in C.