cleanup of table extraction