Revert "Add abstract base classes for graph."

This reverts commit 5738e8d2601e9154ae936e144e7ef48928122dda.