Added inplaceSimple and inplaceMidPivot implementations