visualizer2: refactoring.