Truth table refactored to use TableLayout. Fits onscreen, no truncation, simpler logic than previously.