Many changes in sorting classes