refactors to clean visualizations