Almost done
minor"
Improved performance of reordering