Implemented filter on general graph module and simplified test code