Minor `diagrams` tool code cleanup