added docs and cleaned up interface of AbstractGraph.