1. Cleaning up: fixed tests, and added some error checking for tabular