Index: trunk/ippTools/src/chiptool.c
===================================================================
--- trunk/ippTools/src/chiptool.c	(revision 6223)
+++ trunk/ippTools/src/chiptool.c	(revision 6258)
@@ -51,5 +51,5 @@
 static bool quickMode(pxConfig *config)
 {
-    psArray *rawFrames = p2searchRawFrames(config);
+    psArray *rawFrames = rawScienceFrameSearch(config);
     if (!rawFrames) {
         psError(PS_ERR_UNKNOWN, false, "no rawScienceFrames found");
@@ -67,10 +67,10 @@
 static bool defineMode(pxConfig *config)
 {
-    psArray *rawFrames = p2searchRawFrames(config);
+    psArray *rawFrames = rawScienceFrameSearch(config);
     if (!rawFrames) {
         psError(PS_ERR_UNKNOWN, false, "no rawScienceFrames found");
         return false;
     }
-    psArray *pendingFrames = p2searchPendingFrames(config);
+    psArray *pendingFrames = p2PendingFrameSearch(config);
     // XXX compare raw frames to pending frames and remove duplicate 
     // frames from the raw set.  This may not be quiet right as it's
@@ -94,24 +94,24 @@
 
         psFree(pendingFrames);
-    }
-
-    psArray *doneFrames = p2searchDoneFrames(config);
-    if (doneFrames && (rawFrames->n > 0)) {
-        for (int i = 0; i < rawFrames->n; i++) {
-            rawScienceFrame *rawFrame = rawFrames->data[i];
-            for (int j = 0; j < pendingFrames->n; j++) {
-                p2DoneFrame *doneFrame = pendingFrames->data[j];
-                if (strcmp(rawFrame->exposure->exp_id,
-                           doneFrame->exposure->exp_id) == 0) {
-                    psArrayRemove(rawFrames, rawFrame);
-                    // dec the counter as the array just got shorter
-                    // and we don't want to skip elemnts
-                    i--;
-                    break;
-                } 
-            }
-        }
-
-        psFree(doneFrames);
+
+        psArray *doneFrames = p2searchDoneFrames(config);
+        if (doneFrames && (rawFrames->n > 0)) {
+            for (int i = 0; i < rawFrames->n; i++) {
+                rawScienceFrame *rawFrame = rawFrames->data[i];
+                for (int j = 0; j < pendingFrames->n; j++) {
+                    p2DoneFrame *doneFrame = pendingFrames->data[j];
+                    if (strcmp(rawFrame->exposure->exp_id,
+                               doneFrame->exposure->exp_id) == 0) {
+                        psArrayRemove(rawFrames, rawFrame);
+                        // dec the counter as the array just got shorter
+                        // and we don't want to skip elemnts
+                        i--;
+                        break;
+                    } 
+                }
+            }
+
+            psFree(doneFrames);
+        }
     }
 
@@ -133,5 +133,5 @@
 static bool pendingMode(pxConfig *config)
 {
-    psArray *pendingFrames = p2searchPendingFrames(config);
+    psArray *pendingFrames = p2PendingFrameSearch(config);
     if (!pendingFrames) {
         psError(PS_ERR_UNKNOWN, false, "no p2PendingFrames found");
