Refactored class AnnotationGraph.