A refactoring that introduces the "viz function" as a way to encapsulate configurable logic for graphics and visualization.