Close to a working insertion sort...