Visualization rewritten to be more modular