Added scaling and basic export to svg for diagrams