Refactored Graph Writer to use Object Graph