Added support for contingency tables
Fixed typos in contingency table functions