Only mention the gapsize when actually used
Fixed the inner sort loop for generic element size