Insertion sort and test implemented.