Add API for generate graph, remove unused file