Sorting routines, just for fun.