    index number."
   ([position-list idx]
     (when idx
-      (let [position-list (or position-list (.getPositionList gui))]
+      (when position-list
         (when (pos? (.getNumberOfPositions position-list))
           (.getPosition position-list idx)))))
   ([idx]
     (get-msp nil idx)))
-
-
-(defn add-msp
-  "Add a MultiStagePosition object to the position list."
-  ([position-list label x y z]
-    (.addPosition position-list
-                  (doto
-                    (MultiStagePosition.
-                      (core getXYStageDevice) x y
-                      (core getFocusDevice) z)
-                    (.setLabel label))))
-  ([label x y z]
-    (add-msp (.getPositionList gui) label x y z)))
-
-(defn remove-msp
-  ([position-list idx]
-    (.removePosition position-list idx))
-  ([idx]
-    (remove-msp (.getPositionList gui) idx)))
 
 (defn get-msp-z-position
   "Get the z position for a given z-stage from the MultiStagePosition

   property are grouped together in a vector: [[dev prop] value]."
  [dev prop]
  [[dev prop] (get-property-value dev prop)])
       
(defn get-positions
  "Get the position list as a vector of MultiStagePositions."
  ([position-list]
    (vec (.getPositions (or position-list (.getPositionList gui)))))
  ([]
    (get-positions nil)))

(defn get-allowed-property-values
  "Returns a sequence of the allowed property values

  ([idx z-stage z]
    (set-msp-z-position nil idx z-stage z)))  

(defn swig-vector-contents
  "Returns a string containing all values in a swig vector
   with spaces in between."
