Add unittest stableSort
Use in and auto ref
Use auto ref
Better namings
Comments and renamings