Moved table check all code to header.