diff --git a/cost_function.py b/cost_function.py
index 4058f2f4351aa1bfcf782ae2dc60d804862f56da..8c27ce7e27e5ddf3636b72c300e893b0dc4d0761 100755
--- a/cost_function.py
+++ b/cost_function.py
@@ -1,13 +1,22 @@
 #!/usr/bin/env python3
 
-# A script that takes a segmented graph in the gt format and performs the 
-# non-local cost function calculation where each edge will have a cost
-# function assigned to it. 
-# Inputs (to be changed within the script):
-    # node_id_param_file
-    # gt graph
-    # shapefiles
-# Output: a gt graph with cost functions and an xml graph with cost functions
+"""A script that takes a segmented graph in the gt format and performs
+the non-local cost function calculation where each edge will have a
+cost function assigned to it.
+
+Input:
+
+- "node_id_param.json", expected to be in the current directory
+
+- the graph of segments, "segments.gt" or "segments.graphml", expected
+  to be in the current directory
+
+- shapefiles, specified as command line arguments
+
+Output: the graph of segments with cost functions,
+'segments_cost_functions.gt'
+
+"""
 
 import graph_tool
 import time
@@ -297,15 +306,5 @@ for edge in g.edges():
     g.ep.nl_cost_function[edge] = cf
 
 
-################################
-# Writing to an GT Graph File #
-################################
-
-#g.save("segments_cyclo_gl_cf.xml")
-#print("Done writing xml.")
-print("Done writing gt.")
-#g.save('segmented_cf.gv', fmt = "dot")
-#print("Done writing dot file.")
-
 g.save('segments_cost_functions.gt')
 print('All done')
diff --git a/segments.py b/segments.py
index 87666697849cda61dce7a3379764d8f9be61893e..89a696d6f7c86bbd14dd97272a3266cdaef61fff 100755
--- a/segments.py
+++ b/segments.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python3
 
-"""Collapses the input graph into a new graph: the graph of
-segments. A vertex of the new graph is a segment. The new graph is
-output in the binary format of graph-tool. Input file should be an
-edgelist in CSV format. Output file can have suffix ".gt" or
+"""Collapses the input graph of instantaneous eddies into a new graph:
+the graph of segments. A vertex of the new graph is a segment. The new
+graph is output in the binary format of Graph-tool. Input file should
+be an edgelist in CSV format. Output file can have suffix ".gt" or
 ".graphml".
 
 """