Moved shared visualization code into base Visualization class