Moved the sorting entry structure to a separate file following @jwillis' work in the vectorisation branch.