Changed EdgeDirection from Enumeration to case classes.