quick and dirty merge of tablestuff code with master. tested details table, works