Moving sorting stuff to filelist definition