more visualizer code cleanup