enhancements to process_subgraph

Includes clustering, other stats