Finished adding support for contingency tables