Cleaned the hadronic chi2 code