Moved sorting of displ to the file reader as in .m code