preparation for sorter
updated version
not processing nfos, and some other changes