adding next version of sorting class

This should be all the classes we need. The sorting class will not quite
compile yet.