First Commit

Base chi-square code