Adding chi2 sorting algorithm and lxplus scripts