Mircea : implemented getting edge for id and refactored name of classes
Mircea : changing new segment to new Segment