Index: trunk/ippTools/src/dettool.c
===================================================================
--- trunk/ippTools/src/dettool.c	(revision 14270)
+++ trunk/ippTools/src/dettool.c	(revision 14271)
@@ -6572,16 +6572,4 @@
     }
 
-    // everything else is optional
-    psString mode = psMetadataLookupStr(&status, config->args, "-mode");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -mode");
-        return false;
-    }
-    // check mode
-    if (mode && !isValidMode(config, mode)) {
-        psError(PS_ERR_UNKNOWN, false, "invalud mode");
-        return false;
-    }
-
     psString camera = psMetadataLookupStr(&status, config->args, "-inst");
     if (!status) {
@@ -6743,22 +6731,4 @@
     }
 
-    psF64 bg = psMetadataLookupF64(&status, config->args, "-bg");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -bg");
-        return false;
-    }
-
-    psF64 bg_stdev = psMetadataLookupF64(&status, config->args, "-bg_stdev");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -bg_stdev");
-        return false;
-    }
-
-    psF64 bg_mean_stdev = psMetadataLookupF64(&status, config->args, "-bg_mean_stdev");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -bg_mean_stdev");
-        return false;
-    }
-
     psString parent = psMetadataLookupStr(&status, config->args, "-parent");
     if (!status) {
@@ -6779,9 +6749,9 @@
 
     if (!detRunInsert(config->dbh,
-                      0,          // det_id
-                      0,          // the iteration is fixed at 0
+                      0,            // det_id
+                      0,            // the iteration is fixed at 0
                       det_type,
-                      mode,
-                      "reg",      // state
+                      "register",   // mode
+                      "register",   // state
                       filelevel,
                       workdir,
@@ -6819,28 +6789,12 @@
     psFree(registered);
 
-    if (!detRunSummaryInsert(config->dbh,
-            psDBLastInsertID(config->dbh),
-            0,  // the iteration is fixed at 0
-            bg,
-            bg_stdev,
-            bg_mean_stdev,
-            true,   // accept
-            0       // fault code
-    )) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        // rollback
-        if (!psDBRollback(config->dbh)) {
-            psError(PS_ERR_UNKNOWN, false, "database error");
-        }
-        return false;
-    }
-
-    if (!psDBCommit(config->dbh)) {
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
     // print the new detRun
     psS64 det_id = psDBLastInsertID(config->dbh);
+
+    if (!psDBCommit(config->dbh)) {
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
+
     psArray *detRuns = NULL;
     {
@@ -7045,5 +6999,5 @@
             || (strncmp(state, "stop", 5) == 0)
             || (strncmp(state, "drop", 5) == 0)
-            || (strncmp(state, "reg", 4) == 0)
+            || (strncmp(state, "register", 4) == 0)
         )
     ) {
