Added a graph_destroy() function to deallocate the space of graph created. Renamed functions and added docs.