Work on dynamic tables

Is broken needs some more work.