Further progress towards the sort implementation