Separated the visualizer drawing code in its own class