Visualization feature

This is the visualization code that Demian and I discussed about a month ago, incorporating the changes that were suggested at that time.