Added new flag -low-memory and a flag to set if chi2 is applied or not.