Added option to exclude variables. Added possibility to reorder data based on an index variable.