Finished the Generic type for the abstract graph files

The result may seem completly repulsive. However, I don't know if there
is a more elegant solution. Will look for it.