moved classes to their own files

using prolog terms as arguments  for graph_viewer