Sorter update

Introduction of smooth sort which should be faster and more memory efficient in than the default sorter.