        
        ;; Create planning script
        (when (fs/exists? planner-template)
-             (fs/copy planner-template plan-script)
-             (fs/chmod "+x" plan-script))
-       
-       
+         (fs/copy planner-template plan-script)
+         (fs/chmod "+x" plan-script))
+       
+
+       ;; Create README
        (when (fs/exists? readme-template)
          (create-PDDL-file readme-template
                            (str project-dir "README.md")
                            #""
                            ""))
 
+       ;; Create domain
        (when (fs/exists? domain-template)
          (create-PDDL-file domain-template
                            (str project-dir "domain.pddl")
                            #"domain-name"
                            project-name))
 
+       ;; Create problem
        (when (fs/exists? problem-template)
          (create-PDDL-file problem-template
                            (str project-dir "problems/" "p01.pddl")
                            #"domain-name"
                            project-name)))
 
-       
-
-       ;; myPDDL-distance: Calculate distances between PDDL objects
+     
+
+     ;; myPDDL-distance: Calculate distances between PDDL objects
      (= "distance" tool)
      (let [location-file (nth args 1)
            location-predicate (symbol (nth args 2))
+           ;; Get locations from a PDDL file, calculate the distance
+           ;; and add the distances to the init part
            content (pci/add-part-to-PDDL location-file
-                                     'init
-                                     (calc-distance
-                                      (get-specified-predicate-in-pddl-file location-file
-                                                                        location-predicate)))
+                                         'init
+                                         (calc-distance
+                                          (get-specified-predicate-in-pddl-file location-file
+                                                                                location-predicate)))
+           ;; Add -locations.pddl to the new filename
            new-filename (clojure.string/replace-first location-file
                                                       #"(.+)\.pddl"
                                                       "$1-locations.pddl")]
+
+       ;; Write the output to the new filename using fipp (a pretty printer)
        (pci/write->file new-filename (fipp content {:width 85})))
 
      ;; Write dot graph to file.

          coll))

(defn types->hash-map
  "Splits types and converts them into a hash-map"
  [pddl-types]
  (types->hash-map-helper (split-up pddl-types)))




(defn all-pddl-preds->hash-map
  "Take a list of PDDL predicates and
  return a hash-map of types and the
  corresponding predicates"
  [pddl-preds]
  ;; remove :predicates keyword
  (let [pddl-preds (if (= :predicates (first pddl-preds))
