include? fix
use `case` instead of several `if`s
UI.TextMode instead of UI.GetDisplayInfo["TextMode"]