Clean up x-macros stuff.

Also, add integrity checks between high and low level tables using
static asserts.