ChiSqr written. Optimize and add no-data handling.