refactoring VisualizerPanel