layout tweaks to matrix header.
matrix viewer: cleanup code, remove debugging statements