complete rewrite of graph classes to follow current class-system conventions