Adding the graph structure for explain. Updated the add index functionality