refactored, moved functions from diagramView to domeView
refactored, moved functions from diagramView to domeView