Added visualization code.