Split up Diagram.scala