Put in the framework for performing the insertion sort on the indicies.