Fixed issue #1994: created new subclasses to manage vertex and edge types