Move summary and visualization code from visitor to common package