Fix some asserts, add tablex.sub
Fix order of lots of assertions