Optimizes insertion sort

Optimizes insertion sort by using chain swapping and a binary search