Several visualizations related fixes.

See commit messages for details.