Improvements in tables layout detection

Check for nested tables
add the reason in a specific header