Added sort array in place
Fixed dispatch queue memory management.
Fixed session reuse