Sorten function name, refactor toDataFrame.