Moved sorter class to lib directory.