Refactor the table and table signature handling and detection.