Diagram cleanup.