Logic for getting active visualizer is documented and refactored a bit