Major table changes, a few bug fixes