Fixed several visitor issues and added an example pretty printer.