ref #7549 Fix layout
ref #7549 Code refactoring
ref #7549 Add toggle button for tooltips
Fix potential NPE
Refactor CharacterMatrix code