Fix table eq bug

A few largely cosmetic changes.