Refactoring so that the distributed graph is not created with a call to new.
The class distributed filter now holds a reference to the graph instead
of the graph itself.