Genericizing Graph element classes.