tables and xtabs, and a few minor changes