Added subgraph generation
Added frame for subgraphs