Tables to cards

For review, still need to fix tests.