Index: trunk/ippdb/src/ippdb.h
===================================================================
--- trunk/ippdb/src/ippdb.h	(revision 11988)
+++ trunk/ippdb/src/ippdb.h	(revision 12026)
@@ -2504,41 +2504,41 @@
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p1PendingExpRow data structure
- *
- * Structure for representing a single row of p1PendingExp table data.
+/** guidePendingExpRow data structure
+ *
+ * Structure for representing a single row of guidePendingExp table data.
  */
 
 typedef struct {
     char            *exp_tag;
-    psS32           p1_version;
+    psS32           guide_version;
     char            *recipe;
-} p1PendingExpRow;
-
-/** Creates a new p1PendingExpRow object
- *
- *  @return A new p1PendingExpRow object or NULL on failure.
- */
-
-p1PendingExpRow *p1PendingExpRowAlloc(
+} guidePendingExpRow;
+
+/** Creates a new guidePendingExpRow object
+ *
+ *  @return A new guidePendingExpRow object or NULL on failure.
+ */
+
+guidePendingExpRow *guidePendingExpRowAlloc(
     const char      *exp_tag,
-    psS32           p1_version,
+    psS32           guide_version,
     const char      *recipe
 );
 
-/** Creates a new p1PendingExp table
- *
- * @return true on success
- */
-
-bool p1PendingExpCreateTable(
+/** Creates a new guidePendingExp table
+ *
+ * @return true on success
+ */
+
+bool guidePendingExpCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p1PendingExp table
- *
- * @return true on success
- */
-
-bool p1PendingExpDropTable(
+/** Deletes a guidePendingExp table
+ *
+ * @return true on success
+ */
+
+bool guidePendingExpDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -2551,8 +2551,8 @@
  */
 
-bool p1PendingExpInsert(
+bool guidePendingExpInsert(
     psDB            *dbh,               ///< Database handle
     const char      *exp_tag,
-    psS32           p1_version,
+    psS32           guide_version,
     const char      *recipe
 );
@@ -2563,5 +2563,5 @@
  */
 
-long long p1PendingExpDelete(
+long long guidePendingExpDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -2569,5 +2569,5 @@
 );
 
-/** Insert a single p1PendingExpRow object into a table
+/** Insert a single guidePendingExpRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -2576,10 +2576,10 @@
  */
 
-bool p1PendingExpInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p1PendingExpRow *object             ///< p1PendingExpRow object
-);
-
-/** Insert an array of p1PendingExpRow object into a table
+bool guidePendingExpInsertObject(
+    psDB            *dbh,               ///< Database handle
+    guidePendingExpRow *object             ///< guidePendingExpRow object
+);
+
+/** Insert an array of guidePendingExpRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -2588,10 +2588,10 @@
  */
 
-bool p1PendingExpInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p1PendingExpRow objects
-);
-
-/** Insert data from a binary FITS table p1PendingExpRow into the database
+bool guidePendingExpInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of guidePendingExpRow objects
+);
+
+/** Insert data from a binary FITS table guidePendingExpRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -2603,5 +2603,5 @@
  */
 
-bool p1PendingExpInsertFits(
+bool guidePendingExpInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -2618,5 +2618,5 @@
  */
 
-bool p1PendingExpSelectRowsFits(
+bool guidePendingExpSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -2625,22 +2625,22 @@
 );
 
-/** Convert a p1PendingExpRow into an equivalent psMetadata
+/** Convert a guidePendingExpRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p1PendingExpMetadataFromObject(
-    const p1PendingExpRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *guidePendingExpMetadataFromObject(
+    const guidePendingExpRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p1PendingExpRow pointer or NULL on error
- */
-
-p1PendingExpRow *p1PendingExpObjectFromMetadata(
+ * @return A guidePendingExpRow pointer or NULL on error
+ */
+
+guidePendingExpRow *guidePendingExpObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p1PendingExpRow objects in a psArray
+/** Selects up to limit rows from the database and returns as guidePendingExpRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -2649,10 +2649,10 @@
  */
 
-psArray *p1PendingExpSelectRowObjects(
+psArray *guidePendingExpSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p1PendingExp
+/** Deletes a row from the database coresponding to an guidePendingExp
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -2662,7 +2662,7 @@
  */
 
-bool p1PendingExpDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p1PendingExpRow *object    ///< Object to delete
+bool guidePendingExpDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const guidePendingExpRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -2674,10 +2674,10 @@
  */
 
-long long p1PendingExpDeleteRowObjects(
+long long guidePendingExpDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p1PendingExpRow objects
+/** Formats and prints an array of guidePendingExpRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -2687,10 +2687,10 @@
  */
 
-bool p1PendingExpPrintObjects(
+bool guidePendingExpPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p1PendingExpRow objects
+    psArray         *objects,           ///< An array of guidePendingExpRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p1PendingExpRow object
+/** Formats and prints an guidePendingExpRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -2700,33 +2700,33 @@
  */
 
-bool p1PendingExpPrintObject(
+bool guidePendingExpPrintObject(
     FILE            *stream,            ///< a stream
-    p1PendingExpRow *object,    ///< an p1PendingExpRow object
+    guidePendingExpRow *object,    ///< an guidePendingExpRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p2PendingExpRow data structure
- *
- * Structure for representing a single row of p2PendingExp table data.
+/** chipPendingExpRow data structure
+ *
+ * Structure for representing a single row of chipPendingExp table data.
  */
 
 typedef struct {
     char            *exp_tag;
-    psS32           p2_version;
-    psS32           p1_version;
+    psS32           chip_version;
+    psS32           guide_version;
     char            *label;
     char            *recipe;
     char            *expgroup;
     char            *dvodb;
-} p2PendingExpRow;
-
-/** Creates a new p2PendingExpRow object
- *
- *  @return A new p2PendingExpRow object or NULL on failure.
- */
-
-p2PendingExpRow *p2PendingExpRowAlloc(
+} chipPendingExpRow;
+
+/** Creates a new chipPendingExpRow object
+ *
+ *  @return A new chipPendingExpRow object or NULL on failure.
+ */
+
+chipPendingExpRow *chipPendingExpRowAlloc(
     const char      *exp_tag,
-    psS32           p2_version,
-    psS32           p1_version,
+    psS32           chip_version,
+    psS32           guide_version,
     const char      *label,
     const char      *recipe,
@@ -2735,19 +2735,19 @@
 );
 
-/** Creates a new p2PendingExp table
- *
- * @return true on success
- */
-
-bool p2PendingExpCreateTable(
+/** Creates a new chipPendingExp table
+ *
+ * @return true on success
+ */
+
+bool chipPendingExpCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p2PendingExp table
- *
- * @return true on success
- */
-
-bool p2PendingExpDropTable(
+/** Deletes a chipPendingExp table
+ *
+ * @return true on success
+ */
+
+bool chipPendingExpDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -2760,9 +2760,9 @@
  */
 
-bool p2PendingExpInsert(
+bool chipPendingExpInsert(
     psDB            *dbh,               ///< Database handle
     const char      *exp_tag,
-    psS32           p2_version,
-    psS32           p1_version,
+    psS32           chip_version,
+    psS32           guide_version,
     const char      *label,
     const char      *recipe,
@@ -2776,5 +2776,5 @@
  */
 
-long long p2PendingExpDelete(
+long long chipPendingExpDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -2782,5 +2782,5 @@
 );
 
-/** Insert a single p2PendingExpRow object into a table
+/** Insert a single chipPendingExpRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -2789,10 +2789,10 @@
  */
 
-bool p2PendingExpInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p2PendingExpRow *object             ///< p2PendingExpRow object
-);
-
-/** Insert an array of p2PendingExpRow object into a table
+bool chipPendingExpInsertObject(
+    psDB            *dbh,               ///< Database handle
+    chipPendingExpRow *object             ///< chipPendingExpRow object
+);
+
+/** Insert an array of chipPendingExpRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -2801,10 +2801,10 @@
  */
 
-bool p2PendingExpInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p2PendingExpRow objects
-);
-
-/** Insert data from a binary FITS table p2PendingExpRow into the database
+bool chipPendingExpInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of chipPendingExpRow objects
+);
+
+/** Insert data from a binary FITS table chipPendingExpRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -2816,5 +2816,5 @@
  */
 
-bool p2PendingExpInsertFits(
+bool chipPendingExpInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -2831,5 +2831,5 @@
  */
 
-bool p2PendingExpSelectRowsFits(
+bool chipPendingExpSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -2838,22 +2838,22 @@
 );
 
-/** Convert a p2PendingExpRow into an equivalent psMetadata
+/** Convert a chipPendingExpRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p2PendingExpMetadataFromObject(
-    const p2PendingExpRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *chipPendingExpMetadataFromObject(
+    const chipPendingExpRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p2PendingExpRow pointer or NULL on error
- */
-
-p2PendingExpRow *p2PendingExpObjectFromMetadata(
+ * @return A chipPendingExpRow pointer or NULL on error
+ */
+
+chipPendingExpRow *chipPendingExpObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p2PendingExpRow objects in a psArray
+/** Selects up to limit rows from the database and returns as chipPendingExpRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -2862,10 +2862,10 @@
  */
 
-psArray *p2PendingExpSelectRowObjects(
+psArray *chipPendingExpSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p2PendingExp
+/** Deletes a row from the database coresponding to an chipPendingExp
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -2875,7 +2875,7 @@
  */
 
-bool p2PendingExpDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p2PendingExpRow *object    ///< Object to delete
+bool chipPendingExpDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const chipPendingExpRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -2887,10 +2887,10 @@
  */
 
-long long p2PendingExpDeleteRowObjects(
+long long chipPendingExpDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p2PendingExpRow objects
+/** Formats and prints an array of chipPendingExpRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -2900,10 +2900,10 @@
  */
 
-bool p2PendingExpPrintObjects(
+bool chipPendingExpPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p2PendingExpRow objects
+    psArray         *objects,           ///< An array of chipPendingExpRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p2PendingExpRow object
+/** Formats and prints an chipPendingExpRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -2913,32 +2913,32 @@
  */
 
-bool p2PendingExpPrintObject(
+bool chipPendingExpPrintObject(
     FILE            *stream,            ///< a stream
-    p2PendingExpRow *object,    ///< an p2PendingExpRow object
+    chipPendingExpRow *object,    ///< an chipPendingExpRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p2PendingImfileRow data structure
- *
- * Structure for representing a single row of p2PendingImfile table data.
+/** chipPendingImfileRow data structure
+ *
+ * Structure for representing a single row of chipPendingImfile table data.
  */
 
 typedef struct {
     char            *exp_tag;
-    psS32           p2_version;
-    psS32           p1_version;
+    psS32           chip_version;
+    psS32           guide_version;
     char            *class_id;
     char            *recipe;
     char            *uri;
-} p2PendingImfileRow;
-
-/** Creates a new p2PendingImfileRow object
- *
- *  @return A new p2PendingImfileRow object or NULL on failure.
- */
-
-p2PendingImfileRow *p2PendingImfileRowAlloc(
+} chipPendingImfileRow;
+
+/** Creates a new chipPendingImfileRow object
+ *
+ *  @return A new chipPendingImfileRow object or NULL on failure.
+ */
+
+chipPendingImfileRow *chipPendingImfileRowAlloc(
     const char      *exp_tag,
-    psS32           p2_version,
-    psS32           p1_version,
+    psS32           chip_version,
+    psS32           guide_version,
     const char      *class_id,
     const char      *recipe,
@@ -2946,19 +2946,19 @@
 );
 
-/** Creates a new p2PendingImfile table
- *
- * @return true on success
- */
-
-bool p2PendingImfileCreateTable(
+/** Creates a new chipPendingImfile table
+ *
+ * @return true on success
+ */
+
+bool chipPendingImfileCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p2PendingImfile table
- *
- * @return true on success
- */
-
-bool p2PendingImfileDropTable(
+/** Deletes a chipPendingImfile table
+ *
+ * @return true on success
+ */
+
+bool chipPendingImfileDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -2971,9 +2971,9 @@
  */
 
-bool p2PendingImfileInsert(
+bool chipPendingImfileInsert(
     psDB            *dbh,               ///< Database handle
     const char      *exp_tag,
-    psS32           p2_version,
-    psS32           p1_version,
+    psS32           chip_version,
+    psS32           guide_version,
     const char      *class_id,
     const char      *recipe,
@@ -2986,5 +2986,5 @@
  */
 
-long long p2PendingImfileDelete(
+long long chipPendingImfileDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -2992,5 +2992,5 @@
 );
 
-/** Insert a single p2PendingImfileRow object into a table
+/** Insert a single chipPendingImfileRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -2999,10 +2999,10 @@
  */
 
-bool p2PendingImfileInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p2PendingImfileRow *object             ///< p2PendingImfileRow object
-);
-
-/** Insert an array of p2PendingImfileRow object into a table
+bool chipPendingImfileInsertObject(
+    psDB            *dbh,               ///< Database handle
+    chipPendingImfileRow *object             ///< chipPendingImfileRow object
+);
+
+/** Insert an array of chipPendingImfileRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -3011,10 +3011,10 @@
  */
 
-bool p2PendingImfileInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p2PendingImfileRow objects
-);
-
-/** Insert data from a binary FITS table p2PendingImfileRow into the database
+bool chipPendingImfileInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of chipPendingImfileRow objects
+);
+
+/** Insert data from a binary FITS table chipPendingImfileRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -3026,5 +3026,5 @@
  */
 
-bool p2PendingImfileInsertFits(
+bool chipPendingImfileInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -3041,5 +3041,5 @@
  */
 
-bool p2PendingImfileSelectRowsFits(
+bool chipPendingImfileSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -3048,22 +3048,22 @@
 );
 
-/** Convert a p2PendingImfileRow into an equivalent psMetadata
+/** Convert a chipPendingImfileRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p2PendingImfileMetadataFromObject(
-    const p2PendingImfileRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *chipPendingImfileMetadataFromObject(
+    const chipPendingImfileRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p2PendingImfileRow pointer or NULL on error
- */
-
-p2PendingImfileRow *p2PendingImfileObjectFromMetadata(
+ * @return A chipPendingImfileRow pointer or NULL on error
+ */
+
+chipPendingImfileRow *chipPendingImfileObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p2PendingImfileRow objects in a psArray
+/** Selects up to limit rows from the database and returns as chipPendingImfileRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -3072,10 +3072,10 @@
  */
 
-psArray *p2PendingImfileSelectRowObjects(
+psArray *chipPendingImfileSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p2PendingImfile
+/** Deletes a row from the database coresponding to an chipPendingImfile
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -3085,7 +3085,7 @@
  */
 
-bool p2PendingImfileDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p2PendingImfileRow *object    ///< Object to delete
+bool chipPendingImfileDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const chipPendingImfileRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -3097,10 +3097,10 @@
  */
 
-long long p2PendingImfileDeleteRowObjects(
+long long chipPendingImfileDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p2PendingImfileRow objects
+/** Formats and prints an array of chipPendingImfileRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -3110,10 +3110,10 @@
  */
 
-bool p2PendingImfilePrintObjects(
+bool chipPendingImfilePrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p2PendingImfileRow objects
+    psArray         *objects,           ///< An array of chipPendingImfileRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p2PendingImfileRow object
+/** Formats and prints an chipPendingImfileRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -3123,32 +3123,32 @@
  */
 
-bool p2PendingImfilePrintObject(
+bool chipPendingImfilePrintObject(
     FILE            *stream,            ///< a stream
-    p2PendingImfileRow *object,    ///< an p2PendingImfileRow object
+    chipPendingImfileRow *object,    ///< an chipPendingImfileRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p2ProcessedExpRow data structure
- *
- * Structure for representing a single row of p2ProcessedExp table data.
+/** chipProcessedExpRow data structure
+ *
+ * Structure for representing a single row of chipProcessedExp table data.
  */
 
 typedef struct {
     char            *exp_tag;
-    psS32           p2_version;
-    psS32           p1_version;
+    psS32           chip_version;
+    psS32           guide_version;
     char            *label;
     char            *expgroup;
     char            *dvodb;
-} p2ProcessedExpRow;
-
-/** Creates a new p2ProcessedExpRow object
- *
- *  @return A new p2ProcessedExpRow object or NULL on failure.
- */
-
-p2ProcessedExpRow *p2ProcessedExpRowAlloc(
+} chipProcessedExpRow;
+
+/** Creates a new chipProcessedExpRow object
+ *
+ *  @return A new chipProcessedExpRow object or NULL on failure.
+ */
+
+chipProcessedExpRow *chipProcessedExpRowAlloc(
     const char      *exp_tag,
-    psS32           p2_version,
-    psS32           p1_version,
+    psS32           chip_version,
+    psS32           guide_version,
     const char      *label,
     const char      *expgroup,
@@ -3156,19 +3156,19 @@
 );
 
-/** Creates a new p2ProcessedExp table
- *
- * @return true on success
- */
-
-bool p2ProcessedExpCreateTable(
+/** Creates a new chipProcessedExp table
+ *
+ * @return true on success
+ */
+
+bool chipProcessedExpCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p2ProcessedExp table
- *
- * @return true on success
- */
-
-bool p2ProcessedExpDropTable(
+/** Deletes a chipProcessedExp table
+ *
+ * @return true on success
+ */
+
+bool chipProcessedExpDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -3181,9 +3181,9 @@
  */
 
-bool p2ProcessedExpInsert(
+bool chipProcessedExpInsert(
     psDB            *dbh,               ///< Database handle
     const char      *exp_tag,
-    psS32           p2_version,
-    psS32           p1_version,
+    psS32           chip_version,
+    psS32           guide_version,
     const char      *label,
     const char      *expgroup,
@@ -3196,5 +3196,5 @@
  */
 
-long long p2ProcessedExpDelete(
+long long chipProcessedExpDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -3202,5 +3202,5 @@
 );
 
-/** Insert a single p2ProcessedExpRow object into a table
+/** Insert a single chipProcessedExpRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -3209,10 +3209,10 @@
  */
 
-bool p2ProcessedExpInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p2ProcessedExpRow *object             ///< p2ProcessedExpRow object
-);
-
-/** Insert an array of p2ProcessedExpRow object into a table
+bool chipProcessedExpInsertObject(
+    psDB            *dbh,               ///< Database handle
+    chipProcessedExpRow *object             ///< chipProcessedExpRow object
+);
+
+/** Insert an array of chipProcessedExpRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -3221,10 +3221,10 @@
  */
 
-bool p2ProcessedExpInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p2ProcessedExpRow objects
-);
-
-/** Insert data from a binary FITS table p2ProcessedExpRow into the database
+bool chipProcessedExpInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of chipProcessedExpRow objects
+);
+
+/** Insert data from a binary FITS table chipProcessedExpRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -3236,5 +3236,5 @@
  */
 
-bool p2ProcessedExpInsertFits(
+bool chipProcessedExpInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -3251,5 +3251,5 @@
  */
 
-bool p2ProcessedExpSelectRowsFits(
+bool chipProcessedExpSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -3258,22 +3258,22 @@
 );
 
-/** Convert a p2ProcessedExpRow into an equivalent psMetadata
+/** Convert a chipProcessedExpRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p2ProcessedExpMetadataFromObject(
-    const p2ProcessedExpRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *chipProcessedExpMetadataFromObject(
+    const chipProcessedExpRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p2ProcessedExpRow pointer or NULL on error
- */
-
-p2ProcessedExpRow *p2ProcessedExpObjectFromMetadata(
+ * @return A chipProcessedExpRow pointer or NULL on error
+ */
+
+chipProcessedExpRow *chipProcessedExpObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p2ProcessedExpRow objects in a psArray
+/** Selects up to limit rows from the database and returns as chipProcessedExpRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -3282,10 +3282,10 @@
  */
 
-psArray *p2ProcessedExpSelectRowObjects(
+psArray *chipProcessedExpSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p2ProcessedExp
+/** Deletes a row from the database coresponding to an chipProcessedExp
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -3295,7 +3295,7 @@
  */
 
-bool p2ProcessedExpDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p2ProcessedExpRow *object    ///< Object to delete
+bool chipProcessedExpDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const chipProcessedExpRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -3307,10 +3307,10 @@
  */
 
-long long p2ProcessedExpDeleteRowObjects(
+long long chipProcessedExpDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p2ProcessedExpRow objects
+/** Formats and prints an array of chipProcessedExpRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -3320,10 +3320,10 @@
  */
 
-bool p2ProcessedExpPrintObjects(
+bool chipProcessedExpPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p2ProcessedExpRow objects
+    psArray         *objects,           ///< An array of chipProcessedExpRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p2ProcessedExpRow object
+/** Formats and prints an chipProcessedExpRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -3333,42 +3333,42 @@
  */
 
-bool p2ProcessedExpPrintObject(
+bool chipProcessedExpPrintObject(
     FILE            *stream,            ///< a stream
-    p2ProcessedExpRow *object,    ///< an p2ProcessedExpRow object
+    chipProcessedExpRow *object,    ///< an chipProcessedExpRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p2MaskRow data structure
- *
- * Structure for representing a single row of p2Mask table data.
+/** chipMaskRow data structure
+ *
+ * Structure for representing a single row of chipMask table data.
  */
 
 typedef struct {
     char            *label;
-} p2MaskRow;
-
-/** Creates a new p2MaskRow object
- *
- *  @return A new p2MaskRow object or NULL on failure.
- */
-
-p2MaskRow *p2MaskRowAlloc(
+} chipMaskRow;
+
+/** Creates a new chipMaskRow object
+ *
+ *  @return A new chipMaskRow object or NULL on failure.
+ */
+
+chipMaskRow *chipMaskRowAlloc(
     const char      *label
 );
 
-/** Creates a new p2Mask table
- *
- * @return true on success
- */
-
-bool p2MaskCreateTable(
+/** Creates a new chipMask table
+ *
+ * @return true on success
+ */
+
+bool chipMaskCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p2Mask table
- *
- * @return true on success
- */
-
-bool p2MaskDropTable(
+/** Deletes a chipMask table
+ *
+ * @return true on success
+ */
+
+bool chipMaskDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -3381,5 +3381,5 @@
  */
 
-bool p2MaskInsert(
+bool chipMaskInsert(
     psDB            *dbh,               ///< Database handle
     const char      *label
@@ -3391,5 +3391,5 @@
  */
 
-long long p2MaskDelete(
+long long chipMaskDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -3397,5 +3397,5 @@
 );
 
-/** Insert a single p2MaskRow object into a table
+/** Insert a single chipMaskRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -3404,10 +3404,10 @@
  */
 
-bool p2MaskInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p2MaskRow       *object             ///< p2MaskRow object
-);
-
-/** Insert an array of p2MaskRow object into a table
+bool chipMaskInsertObject(
+    psDB            *dbh,               ///< Database handle
+    chipMaskRow     *object             ///< chipMaskRow object
+);
+
+/** Insert an array of chipMaskRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -3416,10 +3416,10 @@
  */
 
-bool p2MaskInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p2MaskRow objects
-);
-
-/** Insert data from a binary FITS table p2MaskRow into the database
+bool chipMaskInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of chipMaskRow objects
+);
+
+/** Insert data from a binary FITS table chipMaskRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -3431,5 +3431,5 @@
  */
 
-bool p2MaskInsertFits(
+bool chipMaskInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -3446,5 +3446,5 @@
  */
 
-bool p2MaskSelectRowsFits(
+bool chipMaskSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -3453,22 +3453,22 @@
 );
 
-/** Convert a p2MaskRow into an equivalent psMetadata
+/** Convert a chipMaskRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p2MaskMetadataFromObject(
-    const p2MaskRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *chipMaskMetadataFromObject(
+    const chipMaskRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p2MaskRow pointer or NULL on error
- */
-
-p2MaskRow *p2MaskObjectFromMetadata(
+ * @return A chipMaskRow pointer or NULL on error
+ */
+
+chipMaskRow *chipMaskObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p2MaskRow objects in a psArray
+/** Selects up to limit rows from the database and returns as chipMaskRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -3477,10 +3477,10 @@
  */
 
-psArray *p2MaskSelectRowObjects(
+psArray *chipMaskSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p2Mask
+/** Deletes a row from the database coresponding to an chipMask
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -3490,7 +3490,7 @@
  */
 
-bool p2MaskDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p2MaskRow *object    ///< Object to delete
+bool chipMaskDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const chipMaskRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -3502,10 +3502,10 @@
  */
 
-long long p2MaskDeleteRowObjects(
+long long chipMaskDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p2MaskRow objects
+/** Formats and prints an array of chipMaskRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -3515,10 +3515,10 @@
  */
 
-bool p2MaskPrintObjects(
+bool chipMaskPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p2MaskRow objects
+    psArray         *objects,           ///< An array of chipMaskRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p2MaskRow object
+/** Formats and prints an chipMaskRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -3528,18 +3528,18 @@
  */
 
-bool p2MaskPrintObject(
+bool chipMaskPrintObject(
     FILE            *stream,            ///< a stream
-    p2MaskRow *object,    ///< an p2MaskRow object
+    chipMaskRow *object,    ///< an chipMaskRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p2ProcessedImfileRow data structure
- *
- * Structure for representing a single row of p2ProcessedImfile table data.
+/** chipProcessedImfileRow data structure
+ *
+ * Structure for representing a single row of chipProcessedImfile table data.
  */
 
 typedef struct {
     char            *exp_tag;
-    psS32           p2_version;
-    psS32           p1_version;
+    psS32           chip_version;
+    psS32           guide_version;
     char            *class_id;
     char            *recipe;
@@ -3551,15 +3551,15 @@
     char            *b2_uri;
     psS16           fault;
-} p2ProcessedImfileRow;
-
-/** Creates a new p2ProcessedImfileRow object
- *
- *  @return A new p2ProcessedImfileRow object or NULL on failure.
- */
-
-p2ProcessedImfileRow *p2ProcessedImfileRowAlloc(
+} chipProcessedImfileRow;
+
+/** Creates a new chipProcessedImfileRow object
+ *
+ *  @return A new chipProcessedImfileRow object or NULL on failure.
+ */
+
+chipProcessedImfileRow *chipProcessedImfileRowAlloc(
     const char      *exp_tag,
-    psS32           p2_version,
-    psS32           p1_version,
+    psS32           chip_version,
+    psS32           guide_version,
     const char      *class_id,
     const char      *recipe,
@@ -3573,19 +3573,19 @@
 );
 
-/** Creates a new p2ProcessedImfile table
- *
- * @return true on success
- */
-
-bool p2ProcessedImfileCreateTable(
+/** Creates a new chipProcessedImfile table
+ *
+ * @return true on success
+ */
+
+bool chipProcessedImfileCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p2ProcessedImfile table
- *
- * @return true on success
- */
-
-bool p2ProcessedImfileDropTable(
+/** Deletes a chipProcessedImfile table
+ *
+ * @return true on success
+ */
+
+bool chipProcessedImfileDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -3598,9 +3598,9 @@
  */
 
-bool p2ProcessedImfileInsert(
+bool chipProcessedImfileInsert(
     psDB            *dbh,               ///< Database handle
     const char      *exp_tag,
-    psS32           p2_version,
-    psS32           p1_version,
+    psS32           chip_version,
+    psS32           guide_version,
     const char      *class_id,
     const char      *recipe,
@@ -3619,5 +3619,5 @@
  */
 
-long long p2ProcessedImfileDelete(
+long long chipProcessedImfileDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -3625,5 +3625,5 @@
 );
 
-/** Insert a single p2ProcessedImfileRow object into a table
+/** Insert a single chipProcessedImfileRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -3632,10 +3632,10 @@
  */
 
-bool p2ProcessedImfileInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p2ProcessedImfileRow *object             ///< p2ProcessedImfileRow object
-);
-
-/** Insert an array of p2ProcessedImfileRow object into a table
+bool chipProcessedImfileInsertObject(
+    psDB            *dbh,               ///< Database handle
+    chipProcessedImfileRow *object             ///< chipProcessedImfileRow object
+);
+
+/** Insert an array of chipProcessedImfileRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -3644,10 +3644,10 @@
  */
 
-bool p2ProcessedImfileInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p2ProcessedImfileRow objects
-);
-
-/** Insert data from a binary FITS table p2ProcessedImfileRow into the database
+bool chipProcessedImfileInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of chipProcessedImfileRow objects
+);
+
+/** Insert data from a binary FITS table chipProcessedImfileRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -3659,5 +3659,5 @@
  */
 
-bool p2ProcessedImfileInsertFits(
+bool chipProcessedImfileInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -3674,5 +3674,5 @@
  */
 
-bool p2ProcessedImfileSelectRowsFits(
+bool chipProcessedImfileSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -3681,22 +3681,22 @@
 );
 
-/** Convert a p2ProcessedImfileRow into an equivalent psMetadata
+/** Convert a chipProcessedImfileRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p2ProcessedImfileMetadataFromObject(
-    const p2ProcessedImfileRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *chipProcessedImfileMetadataFromObject(
+    const chipProcessedImfileRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p2ProcessedImfileRow pointer or NULL on error
- */
-
-p2ProcessedImfileRow *p2ProcessedImfileObjectFromMetadata(
+ * @return A chipProcessedImfileRow pointer or NULL on error
+ */
+
+chipProcessedImfileRow *chipProcessedImfileObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p2ProcessedImfileRow objects in a psArray
+/** Selects up to limit rows from the database and returns as chipProcessedImfileRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -3705,10 +3705,10 @@
  */
 
-psArray *p2ProcessedImfileSelectRowObjects(
+psArray *chipProcessedImfileSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p2ProcessedImfile
+/** Deletes a row from the database coresponding to an chipProcessedImfile
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -3718,7 +3718,7 @@
  */
 
-bool p2ProcessedImfileDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p2ProcessedImfileRow *object    ///< Object to delete
+bool chipProcessedImfileDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const chipProcessedImfileRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -3730,10 +3730,10 @@
  */
 
-long long p2ProcessedImfileDeleteRowObjects(
+long long chipProcessedImfileDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p2ProcessedImfileRow objects
+/** Formats and prints an array of chipProcessedImfileRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -3743,10 +3743,10 @@
  */
 
-bool p2ProcessedImfilePrintObjects(
+bool chipProcessedImfilePrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p2ProcessedImfileRow objects
+    psArray         *objects,           ///< An array of chipProcessedImfileRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p2ProcessedImfileRow object
+/** Formats and prints an chipProcessedImfileRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -3756,32 +3756,32 @@
  */
 
-bool p2ProcessedImfilePrintObject(
+bool chipProcessedImfilePrintObject(
     FILE            *stream,            ///< a stream
-    p2ProcessedImfileRow *object,    ///< an p2ProcessedImfileRow object
+    chipProcessedImfileRow *object,    ///< an chipProcessedImfileRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p3PendingExpRow data structure
- *
- * Structure for representing a single row of p3PendingExp table data.
+/** camPendingExpRow data structure
+ *
+ * Structure for representing a single row of camPendingExp table data.
  */
 
 typedef struct {
     char            *exp_tag;
-    psS32           p3_version;
-    psS32           p2_version;
+    psS32           cam_version;
+    psS32           chip_version;
     char            *label;
     char            *expgroup;
     char            *dvodb;
-} p3PendingExpRow;
-
-/** Creates a new p3PendingExpRow object
- *
- *  @return A new p3PendingExpRow object or NULL on failure.
- */
-
-p3PendingExpRow *p3PendingExpRowAlloc(
+} camPendingExpRow;
+
+/** Creates a new camPendingExpRow object
+ *
+ *  @return A new camPendingExpRow object or NULL on failure.
+ */
+
+camPendingExpRow *camPendingExpRowAlloc(
     const char      *exp_tag,
-    psS32           p3_version,
-    psS32           p2_version,
+    psS32           cam_version,
+    psS32           chip_version,
     const char      *label,
     const char      *expgroup,
@@ -3789,19 +3789,19 @@
 );
 
-/** Creates a new p3PendingExp table
- *
- * @return true on success
- */
-
-bool p3PendingExpCreateTable(
+/** Creates a new camPendingExp table
+ *
+ * @return true on success
+ */
+
+bool camPendingExpCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p3PendingExp table
- *
- * @return true on success
- */
-
-bool p3PendingExpDropTable(
+/** Deletes a camPendingExp table
+ *
+ * @return true on success
+ */
+
+bool camPendingExpDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -3814,9 +3814,9 @@
  */
 
-bool p3PendingExpInsert(
+bool camPendingExpInsert(
     psDB            *dbh,               ///< Database handle
     const char      *exp_tag,
-    psS32           p3_version,
-    psS32           p2_version,
+    psS32           cam_version,
+    psS32           chip_version,
     const char      *label,
     const char      *expgroup,
@@ -3829,5 +3829,5 @@
  */
 
-long long p3PendingExpDelete(
+long long camPendingExpDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -3835,5 +3835,5 @@
 );
 
-/** Insert a single p3PendingExpRow object into a table
+/** Insert a single camPendingExpRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -3842,10 +3842,10 @@
  */
 
-bool p3PendingExpInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p3PendingExpRow *object             ///< p3PendingExpRow object
-);
-
-/** Insert an array of p3PendingExpRow object into a table
+bool camPendingExpInsertObject(
+    psDB            *dbh,               ///< Database handle
+    camPendingExpRow *object             ///< camPendingExpRow object
+);
+
+/** Insert an array of camPendingExpRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -3854,10 +3854,10 @@
  */
 
-bool p3PendingExpInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p3PendingExpRow objects
-);
-
-/** Insert data from a binary FITS table p3PendingExpRow into the database
+bool camPendingExpInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of camPendingExpRow objects
+);
+
+/** Insert data from a binary FITS table camPendingExpRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -3869,5 +3869,5 @@
  */
 
-bool p3PendingExpInsertFits(
+bool camPendingExpInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -3884,5 +3884,5 @@
  */
 
-bool p3PendingExpSelectRowsFits(
+bool camPendingExpSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -3891,22 +3891,22 @@
 );
 
-/** Convert a p3PendingExpRow into an equivalent psMetadata
+/** Convert a camPendingExpRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p3PendingExpMetadataFromObject(
-    const p3PendingExpRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *camPendingExpMetadataFromObject(
+    const camPendingExpRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p3PendingExpRow pointer or NULL on error
- */
-
-p3PendingExpRow *p3PendingExpObjectFromMetadata(
+ * @return A camPendingExpRow pointer or NULL on error
+ */
+
+camPendingExpRow *camPendingExpObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p3PendingExpRow objects in a psArray
+/** Selects up to limit rows from the database and returns as camPendingExpRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -3915,10 +3915,10 @@
  */
 
-psArray *p3PendingExpSelectRowObjects(
+psArray *camPendingExpSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p3PendingExp
+/** Deletes a row from the database coresponding to an camPendingExp
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -3928,7 +3928,7 @@
  */
 
-bool p3PendingExpDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p3PendingExpRow *object    ///< Object to delete
+bool camPendingExpDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const camPendingExpRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -3940,10 +3940,10 @@
  */
 
-long long p3PendingExpDeleteRowObjects(
+long long camPendingExpDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p3PendingExpRow objects
+/** Formats and prints an array of camPendingExpRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -3953,10 +3953,10 @@
  */
 
-bool p3PendingExpPrintObjects(
+bool camPendingExpPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p3PendingExpRow objects
+    psArray         *objects,           ///< An array of camPendingExpRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p3PendingExpRow object
+/** Formats and prints an camPendingExpRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -3966,18 +3966,18 @@
  */
 
-bool p3PendingExpPrintObject(
+bool camPendingExpPrintObject(
     FILE            *stream,            ///< a stream
-    p3PendingExpRow *object,    ///< an p3PendingExpRow object
+    camPendingExpRow *object,    ///< an camPendingExpRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p3ProcessedExpRow data structure
- *
- * Structure for representing a single row of p3ProcessedExp table data.
+/** camProcessedExpRow data structure
+ *
+ * Structure for representing a single row of camProcessedExp table data.
  */
 
 typedef struct {
     char            *exp_tag;
-    psS32           p3_version;
-    psS32           p2_version;
+    psS32           cam_version;
+    psS32           chip_version;
     char            *label;
     char            *uri;
@@ -3996,15 +3996,15 @@
     char            *expgroup;
     char            *dvodb;
-} p3ProcessedExpRow;
-
-/** Creates a new p3ProcessedExpRow object
- *
- *  @return A new p3ProcessedExpRow object or NULL on failure.
- */
-
-p3ProcessedExpRow *p3ProcessedExpRowAlloc(
+} camProcessedExpRow;
+
+/** Creates a new camProcessedExpRow object
+ *
+ *  @return A new camProcessedExpRow object or NULL on failure.
+ */
+
+camProcessedExpRow *camProcessedExpRowAlloc(
     const char      *exp_tag,
-    psS32           p3_version,
-    psS32           p2_version,
+    psS32           cam_version,
+    psS32           chip_version,
     const char      *label,
     const char      *uri,
@@ -4025,19 +4025,19 @@
 );
 
-/** Creates a new p3ProcessedExp table
- *
- * @return true on success
- */
-
-bool p3ProcessedExpCreateTable(
+/** Creates a new camProcessedExp table
+ *
+ * @return true on success
+ */
+
+bool camProcessedExpCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p3ProcessedExp table
- *
- * @return true on success
- */
-
-bool p3ProcessedExpDropTable(
+/** Deletes a camProcessedExp table
+ *
+ * @return true on success
+ */
+
+bool camProcessedExpDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -4050,9 +4050,9 @@
  */
 
-bool p3ProcessedExpInsert(
+bool camProcessedExpInsert(
     psDB            *dbh,               ///< Database handle
     const char      *exp_tag,
-    psS32           p3_version,
-    psS32           p2_version,
+    psS32           cam_version,
+    psS32           chip_version,
     const char      *label,
     const char      *uri,
@@ -4078,5 +4078,5 @@
  */
 
-long long p3ProcessedExpDelete(
+long long camProcessedExpDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -4084,5 +4084,5 @@
 );
 
-/** Insert a single p3ProcessedExpRow object into a table
+/** Insert a single camProcessedExpRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -4091,10 +4091,10 @@
  */
 
-bool p3ProcessedExpInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p3ProcessedExpRow *object             ///< p3ProcessedExpRow object
-);
-
-/** Insert an array of p3ProcessedExpRow object into a table
+bool camProcessedExpInsertObject(
+    psDB            *dbh,               ///< Database handle
+    camProcessedExpRow *object             ///< camProcessedExpRow object
+);
+
+/** Insert an array of camProcessedExpRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -4103,10 +4103,10 @@
  */
 
-bool p3ProcessedExpInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p3ProcessedExpRow objects
-);
-
-/** Insert data from a binary FITS table p3ProcessedExpRow into the database
+bool camProcessedExpInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of camProcessedExpRow objects
+);
+
+/** Insert data from a binary FITS table camProcessedExpRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -4118,5 +4118,5 @@
  */
 
-bool p3ProcessedExpInsertFits(
+bool camProcessedExpInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -4133,5 +4133,5 @@
  */
 
-bool p3ProcessedExpSelectRowsFits(
+bool camProcessedExpSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -4140,22 +4140,22 @@
 );
 
-/** Convert a p3ProcessedExpRow into an equivalent psMetadata
+/** Convert a camProcessedExpRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p3ProcessedExpMetadataFromObject(
-    const p3ProcessedExpRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *camProcessedExpMetadataFromObject(
+    const camProcessedExpRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p3ProcessedExpRow pointer or NULL on error
- */
-
-p3ProcessedExpRow *p3ProcessedExpObjectFromMetadata(
+ * @return A camProcessedExpRow pointer or NULL on error
+ */
+
+camProcessedExpRow *camProcessedExpObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p3ProcessedExpRow objects in a psArray
+/** Selects up to limit rows from the database and returns as camProcessedExpRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -4164,10 +4164,10 @@
  */
 
-psArray *p3ProcessedExpSelectRowObjects(
+psArray *camProcessedExpSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p3ProcessedExp
+/** Deletes a row from the database coresponding to an camProcessedExp
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -4177,7 +4177,7 @@
  */
 
-bool p3ProcessedExpDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p3ProcessedExpRow *object    ///< Object to delete
+bool camProcessedExpDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const camProcessedExpRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -4189,10 +4189,10 @@
  */
 
-long long p3ProcessedExpDeleteRowObjects(
+long long camProcessedExpDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p3ProcessedExpRow objects
+/** Formats and prints an array of camProcessedExpRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -4202,10 +4202,10 @@
  */
 
-bool p3ProcessedExpPrintObjects(
+bool camProcessedExpPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p3ProcessedExpRow objects
+    psArray         *objects,           ///< An array of camProcessedExpRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p3ProcessedExpRow object
+/** Formats and prints an camProcessedExpRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -4215,42 +4215,42 @@
  */
 
-bool p3ProcessedExpPrintObject(
+bool camProcessedExpPrintObject(
     FILE            *stream,            ///< a stream
-    p3ProcessedExpRow *object,    ///< an p3ProcessedExpRow object
+    camProcessedExpRow *object,    ///< an camProcessedExpRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p3MaskRow data structure
- *
- * Structure for representing a single row of p3Mask table data.
+/** camMaskRow data structure
+ *
+ * Structure for representing a single row of camMask table data.
  */
 
 typedef struct {
     char            *label;
-} p3MaskRow;
-
-/** Creates a new p3MaskRow object
- *
- *  @return A new p3MaskRow object or NULL on failure.
- */
-
-p3MaskRow *p3MaskRowAlloc(
+} camMaskRow;
+
+/** Creates a new camMaskRow object
+ *
+ *  @return A new camMaskRow object or NULL on failure.
+ */
+
+camMaskRow *camMaskRowAlloc(
     const char      *label
 );
 
-/** Creates a new p3Mask table
- *
- * @return true on success
- */
-
-bool p3MaskCreateTable(
+/** Creates a new camMask table
+ *
+ * @return true on success
+ */
+
+bool camMaskCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p3Mask table
- *
- * @return true on success
- */
-
-bool p3MaskDropTable(
+/** Deletes a camMask table
+ *
+ * @return true on success
+ */
+
+bool camMaskDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -4263,5 +4263,5 @@
  */
 
-bool p3MaskInsert(
+bool camMaskInsert(
     psDB            *dbh,               ///< Database handle
     const char      *label
@@ -4273,5 +4273,5 @@
  */
 
-long long p3MaskDelete(
+long long camMaskDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -4279,5 +4279,5 @@
 );
 
-/** Insert a single p3MaskRow object into a table
+/** Insert a single camMaskRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -4286,10 +4286,10 @@
  */
 
-bool p3MaskInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p3MaskRow       *object             ///< p3MaskRow object
-);
-
-/** Insert an array of p3MaskRow object into a table
+bool camMaskInsertObject(
+    psDB            *dbh,               ///< Database handle
+    camMaskRow      *object             ///< camMaskRow object
+);
+
+/** Insert an array of camMaskRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -4298,10 +4298,10 @@
  */
 
-bool p3MaskInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p3MaskRow objects
-);
-
-/** Insert data from a binary FITS table p3MaskRow into the database
+bool camMaskInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of camMaskRow objects
+);
+
+/** Insert data from a binary FITS table camMaskRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -4313,5 +4313,5 @@
  */
 
-bool p3MaskInsertFits(
+bool camMaskInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -4328,5 +4328,5 @@
  */
 
-bool p3MaskSelectRowsFits(
+bool camMaskSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -4335,22 +4335,22 @@
 );
 
-/** Convert a p3MaskRow into an equivalent psMetadata
+/** Convert a camMaskRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p3MaskMetadataFromObject(
-    const p3MaskRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *camMaskMetadataFromObject(
+    const camMaskRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p3MaskRow pointer or NULL on error
- */
-
-p3MaskRow *p3MaskObjectFromMetadata(
+ * @return A camMaskRow pointer or NULL on error
+ */
+
+camMaskRow *camMaskObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p3MaskRow objects in a psArray
+/** Selects up to limit rows from the database and returns as camMaskRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -4359,10 +4359,10 @@
  */
 
-psArray *p3MaskSelectRowObjects(
+psArray *camMaskSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p3Mask
+/** Deletes a row from the database coresponding to an camMask
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -4372,7 +4372,7 @@
  */
 
-bool p3MaskDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p3MaskRow *object    ///< Object to delete
+bool camMaskDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const camMaskRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -4384,10 +4384,10 @@
  */
 
-long long p3MaskDeleteRowObjects(
+long long camMaskDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p3MaskRow objects
+/** Formats and prints an array of camMaskRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -4397,10 +4397,10 @@
  */
 
-bool p3MaskPrintObjects(
+bool camMaskPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p3MaskRow objects
+    psArray         *objects,           ///< An array of camMaskRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p3MaskRow object
+/** Formats and prints an camMaskRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -4410,7 +4410,7 @@
  */
 
-bool p3MaskPrintObject(
+bool camMaskPrintObject(
     FILE            *stream,            ///< a stream
-    p3MaskRow *object,    ///< an p3MaskRow object
+    camMaskRow *object,    ///< an camMaskRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
@@ -6869,11 +6869,11 @@
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p4RunRow data structure
- *
- * Structure for representing a single row of p4Run table data.
+/** warpRunRow data structure
+ *
+ * Structure for representing a single row of warpRun table data.
  */
 
 typedef struct {
-    psS32           p4_id;
+    psS32           warp_id;
     char            *mode;
     char            *state;
@@ -6881,13 +6881,13 @@
     char            *dvodb;
     psTime*         registered;
-} p4RunRow;
-
-/** Creates a new p4RunRow object
- *
- *  @return A new p4RunRow object or NULL on failure.
- */
-
-p4RunRow *p4RunRowAlloc(
-    psS32           p4_id,
+} warpRunRow;
+
+/** Creates a new warpRunRow object
+ *
+ *  @return A new warpRunRow object or NULL on failure.
+ */
+
+warpRunRow *warpRunRowAlloc(
+    psS32           warp_id,
     const char      *mode,
     const char      *state,
@@ -6897,19 +6897,19 @@
 );
 
-/** Creates a new p4Run table
- *
- * @return true on success
- */
-
-bool p4RunCreateTable(
+/** Creates a new warpRun table
+ *
+ * @return true on success
+ */
+
+bool warpRunCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p4Run table
- *
- * @return true on success
- */
-
-bool p4RunDropTable(
+/** Deletes a warpRun table
+ *
+ * @return true on success
+ */
+
+bool warpRunDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -6922,7 +6922,7 @@
  */
 
-bool p4RunInsert(
-    psDB            *dbh,               ///< Database handle
-    psS32           p4_id,
+bool warpRunInsert(
+    psDB            *dbh,               ///< Database handle
+    psS32           warp_id,
     const char      *mode,
     const char      *state,
@@ -6937,5 +6937,5 @@
  */
 
-long long p4RunDelete(
+long long warpRunDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -6943,5 +6943,5 @@
 );
 
-/** Insert a single p4RunRow object into a table
+/** Insert a single warpRunRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -6950,10 +6950,10 @@
  */
 
-bool p4RunInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p4RunRow        *object             ///< p4RunRow object
-);
-
-/** Insert an array of p4RunRow object into a table
+bool warpRunInsertObject(
+    psDB            *dbh,               ///< Database handle
+    warpRunRow      *object             ///< warpRunRow object
+);
+
+/** Insert an array of warpRunRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -6962,10 +6962,10 @@
  */
 
-bool p4RunInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p4RunRow objects
-);
-
-/** Insert data from a binary FITS table p4RunRow into the database
+bool warpRunInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of warpRunRow objects
+);
+
+/** Insert data from a binary FITS table warpRunRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -6977,5 +6977,5 @@
  */
 
-bool p4RunInsertFits(
+bool warpRunInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -6992,5 +6992,5 @@
  */
 
-bool p4RunSelectRowsFits(
+bool warpRunSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -6999,22 +6999,22 @@
 );
 
-/** Convert a p4RunRow into an equivalent psMetadata
+/** Convert a warpRunRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p4RunMetadataFromObject(
-    const p4RunRow  *object             ///< fooRow to convert into a psMetadata
+psMetadata *warpRunMetadataFromObject(
+    const warpRunRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p4RunRow pointer or NULL on error
- */
-
-p4RunRow *p4RunObjectFromMetadata(
+ * @return A warpRunRow pointer or NULL on error
+ */
+
+warpRunRow *warpRunObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p4RunRow objects in a psArray
+/** Selects up to limit rows from the database and returns as warpRunRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -7023,10 +7023,10 @@
  */
 
-psArray *p4RunSelectRowObjects(
+psArray *warpRunSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p4Run
+/** Deletes a row from the database coresponding to an warpRun
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -7036,7 +7036,7 @@
  */
 
-bool p4RunDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p4RunRow *object    ///< Object to delete
+bool warpRunDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const warpRunRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -7048,10 +7048,10 @@
  */
 
-long long p4RunDeleteRowObjects(
+long long warpRunDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p4RunRow objects
+/** Formats and prints an array of warpRunRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -7061,10 +7061,10 @@
  */
 
-bool p4RunPrintObjects(
+bool warpRunPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p4RunRow objects
+    psArray         *objects,           ///< An array of warpRunRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p4RunRow object
+/** Formats and prints an warpRunRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -7074,48 +7074,48 @@
  */
 
-bool p4RunPrintObject(
+bool warpRunPrintObject(
     FILE            *stream,            ///< a stream
-    p4RunRow *object,    ///< an p4RunRow object
+    warpRunRow *object,    ///< an warpRunRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p4InputExpRow data structure
- *
- * Structure for representing a single row of p4InputExp table data.
+/** warpInputExpRow data structure
+ *
+ * Structure for representing a single row of warpInputExp table data.
  */
 
 typedef struct {
-    psS32           p4_id;
+    psS32           warp_id;
     char            *exp_tag;
-    psS32           p3_version;
+    psS32           cam_version;
     bool            magiced;
-} p4InputExpRow;
-
-/** Creates a new p4InputExpRow object
- *
- *  @return A new p4InputExpRow object or NULL on failure.
- */
-
-p4InputExpRow *p4InputExpRowAlloc(
-    psS32           p4_id,
+} warpInputExpRow;
+
+/** Creates a new warpInputExpRow object
+ *
+ *  @return A new warpInputExpRow object or NULL on failure.
+ */
+
+warpInputExpRow *warpInputExpRowAlloc(
+    psS32           warp_id,
     const char      *exp_tag,
-    psS32           p3_version,
+    psS32           cam_version,
     bool            magiced
 );
 
-/** Creates a new p4InputExp table
- *
- * @return true on success
- */
-
-bool p4InputExpCreateTable(
+/** Creates a new warpInputExp table
+ *
+ * @return true on success
+ */
+
+bool warpInputExpCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p4InputExp table
- *
- * @return true on success
- */
-
-bool p4InputExpDropTable(
+/** Deletes a warpInputExp table
+ *
+ * @return true on success
+ */
+
+bool warpInputExpDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -7128,9 +7128,9 @@
  */
 
-bool p4InputExpInsert(
-    psDB            *dbh,               ///< Database handle
-    psS32           p4_id,
+bool warpInputExpInsert(
+    psDB            *dbh,               ///< Database handle
+    psS32           warp_id,
     const char      *exp_tag,
-    psS32           p3_version,
+    psS32           cam_version,
     bool            magiced
 );
@@ -7141,5 +7141,5 @@
  */
 
-long long p4InputExpDelete(
+long long warpInputExpDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -7147,5 +7147,5 @@
 );
 
-/** Insert a single p4InputExpRow object into a table
+/** Insert a single warpInputExpRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -7154,10 +7154,10 @@
  */
 
-bool p4InputExpInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p4InputExpRow   *object             ///< p4InputExpRow object
-);
-
-/** Insert an array of p4InputExpRow object into a table
+bool warpInputExpInsertObject(
+    psDB            *dbh,               ///< Database handle
+    warpInputExpRow *object             ///< warpInputExpRow object
+);
+
+/** Insert an array of warpInputExpRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -7166,10 +7166,10 @@
  */
 
-bool p4InputExpInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p4InputExpRow objects
-);
-
-/** Insert data from a binary FITS table p4InputExpRow into the database
+bool warpInputExpInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of warpInputExpRow objects
+);
+
+/** Insert data from a binary FITS table warpInputExpRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -7181,5 +7181,5 @@
  */
 
-bool p4InputExpInsertFits(
+bool warpInputExpInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -7196,5 +7196,5 @@
  */
 
-bool p4InputExpSelectRowsFits(
+bool warpInputExpSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -7203,22 +7203,22 @@
 );
 
-/** Convert a p4InputExpRow into an equivalent psMetadata
+/** Convert a warpInputExpRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p4InputExpMetadataFromObject(
-    const p4InputExpRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *warpInputExpMetadataFromObject(
+    const warpInputExpRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p4InputExpRow pointer or NULL on error
- */
-
-p4InputExpRow *p4InputExpObjectFromMetadata(
+ * @return A warpInputExpRow pointer or NULL on error
+ */
+
+warpInputExpRow *warpInputExpObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p4InputExpRow objects in a psArray
+/** Selects up to limit rows from the database and returns as warpInputExpRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -7227,10 +7227,10 @@
  */
 
-psArray *p4InputExpSelectRowObjects(
+psArray *warpInputExpSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p4InputExp
+/** Deletes a row from the database coresponding to an warpInputExp
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -7240,7 +7240,7 @@
  */
 
-bool p4InputExpDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p4InputExpRow *object    ///< Object to delete
+bool warpInputExpDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const warpInputExpRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -7252,10 +7252,10 @@
  */
 
-long long p4InputExpDeleteRowObjects(
+long long warpInputExpDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p4InputExpRow objects
+/** Formats and prints an array of warpInputExpRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -7265,10 +7265,10 @@
  */
 
-bool p4InputExpPrintObjects(
+bool warpInputExpPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p4InputExpRow objects
+    psArray         *objects,           ///< An array of warpInputExpRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p4InputExpRow object
+/** Formats and prints an warpInputExpRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -7278,52 +7278,52 @@
  */
 
-bool p4InputExpPrintObject(
+bool warpInputExpPrintObject(
     FILE            *stream,            ///< a stream
-    p4InputExpRow *object,    ///< an p4InputExpRow object
+    warpInputExpRow *object,    ///< an warpInputExpRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p4SkyCellMapRow data structure
- *
- * Structure for representing a single row of p4SkyCellMap table data.
+/** warpSkyCellMapRow data structure
+ *
+ * Structure for representing a single row of warpSkyCellMap table data.
  */
 
 typedef struct {
-    psS32           p4_id;
+    psS32           warp_id;
     char            *skycell_id;
     char            *tess_id;
     char            *exp_tag;
-    psS32           p3_version;
+    psS32           cam_version;
     char            *class_id;
-} p4SkyCellMapRow;
-
-/** Creates a new p4SkyCellMapRow object
- *
- *  @return A new p4SkyCellMapRow object or NULL on failure.
- */
-
-p4SkyCellMapRow *p4SkyCellMapRowAlloc(
-    psS32           p4_id,
+} warpSkyCellMapRow;
+
+/** Creates a new warpSkyCellMapRow object
+ *
+ *  @return A new warpSkyCellMapRow object or NULL on failure.
+ */
+
+warpSkyCellMapRow *warpSkyCellMapRowAlloc(
+    psS32           warp_id,
     const char      *skycell_id,
     const char      *tess_id,
     const char      *exp_tag,
-    psS32           p3_version,
+    psS32           cam_version,
     const char      *class_id
 );
 
-/** Creates a new p4SkyCellMap table
- *
- * @return true on success
- */
-
-bool p4SkyCellMapCreateTable(
+/** Creates a new warpSkyCellMap table
+ *
+ * @return true on success
+ */
+
+bool warpSkyCellMapCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p4SkyCellMap table
- *
- * @return true on success
- */
-
-bool p4SkyCellMapDropTable(
+/** Deletes a warpSkyCellMap table
+ *
+ * @return true on success
+ */
+
+bool warpSkyCellMapDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -7336,11 +7336,11 @@
  */
 
-bool p4SkyCellMapInsert(
-    psDB            *dbh,               ///< Database handle
-    psS32           p4_id,
+bool warpSkyCellMapInsert(
+    psDB            *dbh,               ///< Database handle
+    psS32           warp_id,
     const char      *skycell_id,
     const char      *tess_id,
     const char      *exp_tag,
-    psS32           p3_version,
+    psS32           cam_version,
     const char      *class_id
 );
@@ -7351,5 +7351,5 @@
  */
 
-long long p4SkyCellMapDelete(
+long long warpSkyCellMapDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -7357,5 +7357,5 @@
 );
 
-/** Insert a single p4SkyCellMapRow object into a table
+/** Insert a single warpSkyCellMapRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -7364,10 +7364,10 @@
  */
 
-bool p4SkyCellMapInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p4SkyCellMapRow *object             ///< p4SkyCellMapRow object
-);
-
-/** Insert an array of p4SkyCellMapRow object into a table
+bool warpSkyCellMapInsertObject(
+    psDB            *dbh,               ///< Database handle
+    warpSkyCellMapRow *object             ///< warpSkyCellMapRow object
+);
+
+/** Insert an array of warpSkyCellMapRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -7376,10 +7376,10 @@
  */
 
-bool p4SkyCellMapInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p4SkyCellMapRow objects
-);
-
-/** Insert data from a binary FITS table p4SkyCellMapRow into the database
+bool warpSkyCellMapInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of warpSkyCellMapRow objects
+);
+
+/** Insert data from a binary FITS table warpSkyCellMapRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -7391,5 +7391,5 @@
  */
 
-bool p4SkyCellMapInsertFits(
+bool warpSkyCellMapInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -7406,5 +7406,5 @@
  */
 
-bool p4SkyCellMapSelectRowsFits(
+bool warpSkyCellMapSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -7413,22 +7413,22 @@
 );
 
-/** Convert a p4SkyCellMapRow into an equivalent psMetadata
+/** Convert a warpSkyCellMapRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p4SkyCellMapMetadataFromObject(
-    const p4SkyCellMapRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *warpSkyCellMapMetadataFromObject(
+    const warpSkyCellMapRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p4SkyCellMapRow pointer or NULL on error
- */
-
-p4SkyCellMapRow *p4SkyCellMapObjectFromMetadata(
+ * @return A warpSkyCellMapRow pointer or NULL on error
+ */
+
+warpSkyCellMapRow *warpSkyCellMapObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p4SkyCellMapRow objects in a psArray
+/** Selects up to limit rows from the database and returns as warpSkyCellMapRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -7437,10 +7437,10 @@
  */
 
-psArray *p4SkyCellMapSelectRowObjects(
+psArray *warpSkyCellMapSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p4SkyCellMap
+/** Deletes a row from the database coresponding to an warpSkyCellMap
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -7450,7 +7450,7 @@
  */
 
-bool p4SkyCellMapDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p4SkyCellMapRow *object    ///< Object to delete
+bool warpSkyCellMapDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const warpSkyCellMapRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -7462,10 +7462,10 @@
  */
 
-long long p4SkyCellMapDeleteRowObjects(
+long long warpSkyCellMapDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p4SkyCellMapRow objects
+/** Formats and prints an array of warpSkyCellMapRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -7475,10 +7475,10 @@
  */
 
-bool p4SkyCellMapPrintObjects(
+bool warpSkyCellMapPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p4SkyCellMapRow objects
+    psArray         *objects,           ///< An array of warpSkyCellMapRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p4SkyCellMapRow object
+/** Formats and prints an warpSkyCellMapRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -7488,16 +7488,16 @@
  */
 
-bool p4SkyCellMapPrintObject(
+bool warpSkyCellMapPrintObject(
     FILE            *stream,            ///< a stream
-    p4SkyCellMapRow *object,    ///< an p4SkyCellMapRow object
+    warpSkyCellMapRow *object,    ///< an warpSkyCellMapRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p4SkyfileRow data structure
- *
- * Structure for representing a single row of p4Skyfile table data.
+/** warpSkyfileRow data structure
+ *
+ * Structure for representing a single row of warpSkyfile table data.
  */
 
 typedef struct {
-    psS32           p4_id;
+    psS32           warp_id;
     char            *skycell_id;
     char            *tess_id;
@@ -7505,13 +7505,13 @@
     psF64           bg;
     psF64           bg_mean_stdev;
-} p4SkyfileRow;
-
-/** Creates a new p4SkyfileRow object
- *
- *  @return A new p4SkyfileRow object or NULL on failure.
- */
-
-p4SkyfileRow *p4SkyfileRowAlloc(
-    psS32           p4_id,
+} warpSkyfileRow;
+
+/** Creates a new warpSkyfileRow object
+ *
+ *  @return A new warpSkyfileRow object or NULL on failure.
+ */
+
+warpSkyfileRow *warpSkyfileRowAlloc(
+    psS32           warp_id,
     const char      *skycell_id,
     const char      *tess_id,
@@ -7521,19 +7521,19 @@
 );
 
-/** Creates a new p4Skyfile table
- *
- * @return true on success
- */
-
-bool p4SkyfileCreateTable(
+/** Creates a new warpSkyfile table
+ *
+ * @return true on success
+ */
+
+bool warpSkyfileCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p4Skyfile table
- *
- * @return true on success
- */
-
-bool p4SkyfileDropTable(
+/** Deletes a warpSkyfile table
+ *
+ * @return true on success
+ */
+
+bool warpSkyfileDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -7546,7 +7546,7 @@
  */
 
-bool p4SkyfileInsert(
-    psDB            *dbh,               ///< Database handle
-    psS32           p4_id,
+bool warpSkyfileInsert(
+    psDB            *dbh,               ///< Database handle
+    psS32           warp_id,
     const char      *skycell_id,
     const char      *tess_id,
@@ -7561,5 +7561,5 @@
  */
 
-long long p4SkyfileDelete(
+long long warpSkyfileDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -7567,5 +7567,5 @@
 );
 
-/** Insert a single p4SkyfileRow object into a table
+/** Insert a single warpSkyfileRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -7574,10 +7574,10 @@
  */
 
-bool p4SkyfileInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p4SkyfileRow    *object             ///< p4SkyfileRow object
-);
-
-/** Insert an array of p4SkyfileRow object into a table
+bool warpSkyfileInsertObject(
+    psDB            *dbh,               ///< Database handle
+    warpSkyfileRow  *object             ///< warpSkyfileRow object
+);
+
+/** Insert an array of warpSkyfileRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -7586,10 +7586,10 @@
  */
 
-bool p4SkyfileInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p4SkyfileRow objects
-);
-
-/** Insert data from a binary FITS table p4SkyfileRow into the database
+bool warpSkyfileInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of warpSkyfileRow objects
+);
+
+/** Insert data from a binary FITS table warpSkyfileRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -7601,5 +7601,5 @@
  */
 
-bool p4SkyfileInsertFits(
+bool warpSkyfileInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -7616,5 +7616,5 @@
  */
 
-bool p4SkyfileSelectRowsFits(
+bool warpSkyfileSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -7623,22 +7623,22 @@
 );
 
-/** Convert a p4SkyfileRow into an equivalent psMetadata
+/** Convert a warpSkyfileRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p4SkyfileMetadataFromObject(
-    const p4SkyfileRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *warpSkyfileMetadataFromObject(
+    const warpSkyfileRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p4SkyfileRow pointer or NULL on error
- */
-
-p4SkyfileRow *p4SkyfileObjectFromMetadata(
+ * @return A warpSkyfileRow pointer or NULL on error
+ */
+
+warpSkyfileRow *warpSkyfileObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p4SkyfileRow objects in a psArray
+/** Selects up to limit rows from the database and returns as warpSkyfileRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -7647,10 +7647,10 @@
  */
 
-psArray *p4SkyfileSelectRowObjects(
+psArray *warpSkyfileSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p4Skyfile
+/** Deletes a row from the database coresponding to an warpSkyfile
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -7660,7 +7660,7 @@
  */
 
-bool p4SkyfileDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p4SkyfileRow *object    ///< Object to delete
+bool warpSkyfileDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const warpSkyfileRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -7672,10 +7672,10 @@
  */
 
-long long p4SkyfileDeleteRowObjects(
+long long warpSkyfileDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p4SkyfileRow objects
+/** Formats and prints an array of warpSkyfileRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -7685,10 +7685,10 @@
  */
 
-bool p4SkyfilePrintObjects(
+bool warpSkyfilePrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p4SkyfileRow objects
+    psArray         *objects,           ///< An array of warpSkyfileRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p4SkyfileRow object
+/** Formats and prints an warpSkyfileRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -7698,16 +7698,16 @@
  */
 
-bool p4SkyfilePrintObject(
+bool warpSkyfilePrintObject(
     FILE            *stream,            ///< a stream
-    p4SkyfileRow *object,    ///< an p4SkyfileRow object
+    warpSkyfileRow *object,    ///< an warpSkyfileRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p5RunRow data structure
- *
- * Structure for representing a single row of p5Run table data.
+/** diffRunRow data structure
+ *
+ * Structure for representing a single row of diffRun table data.
  */
 
 typedef struct {
-    psS32           p5_id;
+    psS32           diff_id;
     char            *state;
     char            *workdir;
@@ -7716,13 +7716,13 @@
     char            *skycell_id;
     char            *tess_id;
-} p5RunRow;
-
-/** Creates a new p5RunRow object
- *
- *  @return A new p5RunRow object or NULL on failure.
- */
-
-p5RunRow *p5RunRowAlloc(
-    psS32           p5_id,
+} diffRunRow;
+
+/** Creates a new diffRunRow object
+ *
+ *  @return A new diffRunRow object or NULL on failure.
+ */
+
+diffRunRow *diffRunRowAlloc(
+    psS32           diff_id,
     const char      *state,
     const char      *workdir,
@@ -7733,19 +7733,19 @@
 );
 
-/** Creates a new p5Run table
- *
- * @return true on success
- */
-
-bool p5RunCreateTable(
+/** Creates a new diffRun table
+ *
+ * @return true on success
+ */
+
+bool diffRunCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p5Run table
- *
- * @return true on success
- */
-
-bool p5RunDropTable(
+/** Deletes a diffRun table
+ *
+ * @return true on success
+ */
+
+bool diffRunDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -7758,7 +7758,7 @@
  */
 
-bool p5RunInsert(
-    psDB            *dbh,               ///< Database handle
-    psS32           p5_id,
+bool diffRunInsert(
+    psDB            *dbh,               ///< Database handle
+    psS32           diff_id,
     const char      *state,
     const char      *workdir,
@@ -7774,5 +7774,5 @@
  */
 
-long long p5RunDelete(
+long long diffRunDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -7780,5 +7780,5 @@
 );
 
-/** Insert a single p5RunRow object into a table
+/** Insert a single diffRunRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -7787,10 +7787,10 @@
  */
 
-bool p5RunInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p5RunRow        *object             ///< p5RunRow object
-);
-
-/** Insert an array of p5RunRow object into a table
+bool diffRunInsertObject(
+    psDB            *dbh,               ///< Database handle
+    diffRunRow      *object             ///< diffRunRow object
+);
+
+/** Insert an array of diffRunRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -7799,10 +7799,10 @@
  */
 
-bool p5RunInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p5RunRow objects
-);
-
-/** Insert data from a binary FITS table p5RunRow into the database
+bool diffRunInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of diffRunRow objects
+);
+
+/** Insert data from a binary FITS table diffRunRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -7814,5 +7814,5 @@
  */
 
-bool p5RunInsertFits(
+bool diffRunInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -7829,5 +7829,5 @@
  */
 
-bool p5RunSelectRowsFits(
+bool diffRunSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -7836,22 +7836,22 @@
 );
 
-/** Convert a p5RunRow into an equivalent psMetadata
+/** Convert a diffRunRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p5RunMetadataFromObject(
-    const p5RunRow  *object             ///< fooRow to convert into a psMetadata
+psMetadata *diffRunMetadataFromObject(
+    const diffRunRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p5RunRow pointer or NULL on error
- */
-
-p5RunRow *p5RunObjectFromMetadata(
+ * @return A diffRunRow pointer or NULL on error
+ */
+
+diffRunRow *diffRunObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p5RunRow objects in a psArray
+/** Selects up to limit rows from the database and returns as diffRunRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -7860,10 +7860,10 @@
  */
 
-psArray *p5RunSelectRowObjects(
+psArray *diffRunSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p5Run
+/** Deletes a row from the database coresponding to an diffRun
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -7873,7 +7873,7 @@
  */
 
-bool p5RunDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p5RunRow *object    ///< Object to delete
+bool diffRunDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const diffRunRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -7885,10 +7885,10 @@
  */
 
-long long p5RunDeleteRowObjects(
+long long diffRunDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p5RunRow objects
+/** Formats and prints an array of diffRunRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -7898,10 +7898,10 @@
  */
 
-bool p5RunPrintObjects(
+bool diffRunPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p5RunRow objects
+    psArray         *objects,           ///< An array of diffRunRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p5RunRow object
+/** Formats and prints an diffRunRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -7911,31 +7911,31 @@
  */
 
-bool p5RunPrintObject(
+bool diffRunPrintObject(
     FILE            *stream,            ///< a stream
-    p5RunRow *object,    ///< an p5RunRow object
+    diffRunRow *object,    ///< an diffRunRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p5InputSkyfileRow data structure
- *
- * Structure for representing a single row of p5InputSkyfile table data.
+/** diffInputSkyfileRow data structure
+ *
+ * Structure for representing a single row of diffInputSkyfile table data.
  */
 
 typedef struct {
-    psS32           p5_id;
-    psS32           p4_id;
+    psS32           diff_id;
+    psS32           warp_id;
     char            *skycell_id;
     char            *tess_id;
     char            *kind;
     bool            template;
-} p5InputSkyfileRow;
-
-/** Creates a new p5InputSkyfileRow object
- *
- *  @return A new p5InputSkyfileRow object or NULL on failure.
- */
-
-p5InputSkyfileRow *p5InputSkyfileRowAlloc(
-    psS32           p5_id,
-    psS32           p4_id,
+} diffInputSkyfileRow;
+
+/** Creates a new diffInputSkyfileRow object
+ *
+ *  @return A new diffInputSkyfileRow object or NULL on failure.
+ */
+
+diffInputSkyfileRow *diffInputSkyfileRowAlloc(
+    psS32           diff_id,
+    psS32           warp_id,
     const char      *skycell_id,
     const char      *tess_id,
@@ -7944,19 +7944,19 @@
 );
 
-/** Creates a new p5InputSkyfile table
- *
- * @return true on success
- */
-
-bool p5InputSkyfileCreateTable(
+/** Creates a new diffInputSkyfile table
+ *
+ * @return true on success
+ */
+
+bool diffInputSkyfileCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p5InputSkyfile table
- *
- * @return true on success
- */
-
-bool p5InputSkyfileDropTable(
+/** Deletes a diffInputSkyfile table
+ *
+ * @return true on success
+ */
+
+bool diffInputSkyfileDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -7969,8 +7969,8 @@
  */
 
-bool p5InputSkyfileInsert(
-    psDB            *dbh,               ///< Database handle
-    psS32           p5_id,
-    psS32           p4_id,
+bool diffInputSkyfileInsert(
+    psDB            *dbh,               ///< Database handle
+    psS32           diff_id,
+    psS32           warp_id,
     const char      *skycell_id,
     const char      *tess_id,
@@ -7984,5 +7984,5 @@
  */
 
-long long p5InputSkyfileDelete(
+long long diffInputSkyfileDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -7990,5 +7990,5 @@
 );
 
-/** Insert a single p5InputSkyfileRow object into a table
+/** Insert a single diffInputSkyfileRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -7997,10 +7997,10 @@
  */
 
-bool p5InputSkyfileInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p5InputSkyfileRow *object             ///< p5InputSkyfileRow object
-);
-
-/** Insert an array of p5InputSkyfileRow object into a table
+bool diffInputSkyfileInsertObject(
+    psDB            *dbh,               ///< Database handle
+    diffInputSkyfileRow *object             ///< diffInputSkyfileRow object
+);
+
+/** Insert an array of diffInputSkyfileRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -8009,10 +8009,10 @@
  */
 
-bool p5InputSkyfileInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p5InputSkyfileRow objects
-);
-
-/** Insert data from a binary FITS table p5InputSkyfileRow into the database
+bool diffInputSkyfileInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of diffInputSkyfileRow objects
+);
+
+/** Insert data from a binary FITS table diffInputSkyfileRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -8024,5 +8024,5 @@
  */
 
-bool p5InputSkyfileInsertFits(
+bool diffInputSkyfileInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -8039,5 +8039,5 @@
  */
 
-bool p5InputSkyfileSelectRowsFits(
+bool diffInputSkyfileSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -8046,22 +8046,22 @@
 );
 
-/** Convert a p5InputSkyfileRow into an equivalent psMetadata
+/** Convert a diffInputSkyfileRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p5InputSkyfileMetadataFromObject(
-    const p5InputSkyfileRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *diffInputSkyfileMetadataFromObject(
+    const diffInputSkyfileRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p5InputSkyfileRow pointer or NULL on error
- */
-
-p5InputSkyfileRow *p5InputSkyfileObjectFromMetadata(
+ * @return A diffInputSkyfileRow pointer or NULL on error
+ */
+
+diffInputSkyfileRow *diffInputSkyfileObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p5InputSkyfileRow objects in a psArray
+/** Selects up to limit rows from the database and returns as diffInputSkyfileRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -8070,10 +8070,10 @@
  */
 
-psArray *p5InputSkyfileSelectRowObjects(
+psArray *diffInputSkyfileSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p5InputSkyfile
+/** Deletes a row from the database coresponding to an diffInputSkyfile
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -8083,7 +8083,7 @@
  */
 
-bool p5InputSkyfileDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p5InputSkyfileRow *object    ///< Object to delete
+bool diffInputSkyfileDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const diffInputSkyfileRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -8095,10 +8095,10 @@
  */
 
-long long p5InputSkyfileDeleteRowObjects(
+long long diffInputSkyfileDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p5InputSkyfileRow objects
+/** Formats and prints an array of diffInputSkyfileRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -8108,10 +8108,10 @@
  */
 
-bool p5InputSkyfilePrintObjects(
+bool diffInputSkyfilePrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p5InputSkyfileRow objects
+    psArray         *objects,           ///< An array of diffInputSkyfileRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p5InputSkyfileRow object
+/** Formats and prints an diffInputSkyfileRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -8121,28 +8121,28 @@
  */
 
-bool p5InputSkyfilePrintObject(
+bool diffInputSkyfilePrintObject(
     FILE            *stream,            ///< a stream
-    p5InputSkyfileRow *object,    ///< an p5InputSkyfileRow object
+    diffInputSkyfileRow *object,    ///< an diffInputSkyfileRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p5DiffSkyfileRow data structure
- *
- * Structure for representing a single row of p5DiffSkyfile table data.
+/** diffSkyfileRow data structure
+ *
+ * Structure for representing a single row of diffSkyfile table data.
  */
 
 typedef struct {
-    psS32           p5_id;
+    psS32           diff_id;
     char            *uri;
     psF64           bg;
     psF64           bg_mean_stdev;
-} p5DiffSkyfileRow;
-
-/** Creates a new p5DiffSkyfileRow object
- *
- *  @return A new p5DiffSkyfileRow object or NULL on failure.
- */
-
-p5DiffSkyfileRow *p5DiffSkyfileRowAlloc(
-    psS32           p5_id,
+} diffSkyfileRow;
+
+/** Creates a new diffSkyfileRow object
+ *
+ *  @return A new diffSkyfileRow object or NULL on failure.
+ */
+
+diffSkyfileRow *diffSkyfileRowAlloc(
+    psS32           diff_id,
     const char      *uri,
     psF64           bg,
@@ -8150,19 +8150,19 @@
 );
 
-/** Creates a new p5DiffSkyfile table
- *
- * @return true on success
- */
-
-bool p5DiffSkyfileCreateTable(
+/** Creates a new diffSkyfile table
+ *
+ * @return true on success
+ */
+
+bool diffSkyfileCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p5DiffSkyfile table
- *
- * @return true on success
- */
-
-bool p5DiffSkyfileDropTable(
+/** Deletes a diffSkyfile table
+ *
+ * @return true on success
+ */
+
+bool diffSkyfileDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -8175,7 +8175,7 @@
  */
 
-bool p5DiffSkyfileInsert(
-    psDB            *dbh,               ///< Database handle
-    psS32           p5_id,
+bool diffSkyfileInsert(
+    psDB            *dbh,               ///< Database handle
+    psS32           diff_id,
     const char      *uri,
     psF64           bg,
@@ -8188,5 +8188,5 @@
  */
 
-long long p5DiffSkyfileDelete(
+long long diffSkyfileDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -8194,5 +8194,5 @@
 );
 
-/** Insert a single p5DiffSkyfileRow object into a table
+/** Insert a single diffSkyfileRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -8201,10 +8201,10 @@
  */
 
-bool p5DiffSkyfileInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p5DiffSkyfileRow *object             ///< p5DiffSkyfileRow object
-);
-
-/** Insert an array of p5DiffSkyfileRow object into a table
+bool diffSkyfileInsertObject(
+    psDB            *dbh,               ///< Database handle
+    diffSkyfileRow  *object             ///< diffSkyfileRow object
+);
+
+/** Insert an array of diffSkyfileRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -8213,10 +8213,10 @@
  */
 
-bool p5DiffSkyfileInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p5DiffSkyfileRow objects
-);
-
-/** Insert data from a binary FITS table p5DiffSkyfileRow into the database
+bool diffSkyfileInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of diffSkyfileRow objects
+);
+
+/** Insert data from a binary FITS table diffSkyfileRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -8228,5 +8228,5 @@
  */
 
-bool p5DiffSkyfileInsertFits(
+bool diffSkyfileInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -8243,5 +8243,5 @@
  */
 
-bool p5DiffSkyfileSelectRowsFits(
+bool diffSkyfileSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -8250,22 +8250,22 @@
 );
 
-/** Convert a p5DiffSkyfileRow into an equivalent psMetadata
+/** Convert a diffSkyfileRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p5DiffSkyfileMetadataFromObject(
-    const p5DiffSkyfileRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *diffSkyfileMetadataFromObject(
+    const diffSkyfileRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p5DiffSkyfileRow pointer or NULL on error
- */
-
-p5DiffSkyfileRow *p5DiffSkyfileObjectFromMetadata(
+ * @return A diffSkyfileRow pointer or NULL on error
+ */
+
+diffSkyfileRow *diffSkyfileObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p5DiffSkyfileRow objects in a psArray
+/** Selects up to limit rows from the database and returns as diffSkyfileRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -8274,10 +8274,10 @@
  */
 
-psArray *p5DiffSkyfileSelectRowObjects(
+psArray *diffSkyfileSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p5DiffSkyfile
+/** Deletes a row from the database coresponding to an diffSkyfile
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -8287,7 +8287,7 @@
  */
 
-bool p5DiffSkyfileDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p5DiffSkyfileRow *object    ///< Object to delete
+bool diffSkyfileDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const diffSkyfileRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -8299,10 +8299,10 @@
  */
 
-long long p5DiffSkyfileDeleteRowObjects(
+long long diffSkyfileDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p5DiffSkyfileRow objects
+/** Formats and prints an array of diffSkyfileRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -8312,10 +8312,10 @@
  */
 
-bool p5DiffSkyfilePrintObjects(
+bool diffSkyfilePrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p5DiffSkyfileRow objects
+    psArray         *objects,           ///< An array of diffSkyfileRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p5DiffSkyfileRow object
+/** Formats and prints an diffSkyfileRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -8325,16 +8325,16 @@
  */
 
-bool p5DiffSkyfilePrintObject(
+bool diffSkyfilePrintObject(
     FILE            *stream,            ///< a stream
-    p5DiffSkyfileRow *object,    ///< an p5DiffSkyfileRow object
+    diffSkyfileRow *object,    ///< an diffSkyfileRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p6RunRow data structure
- *
- * Structure for representing a single row of p6Run table data.
+/** stackRunRow data structure
+ *
+ * Structure for representing a single row of stackRun table data.
  */
 
 typedef struct {
-    psS32           p6_id;
+    psS32           stack_id;
     char            *state;
     char            *workdir;
@@ -8343,13 +8343,13 @@
     char            *skycell_id;
     char            *tess_id;
-} p6RunRow;
-
-/** Creates a new p6RunRow object
- *
- *  @return A new p6RunRow object or NULL on failure.
- */
-
-p6RunRow *p6RunRowAlloc(
-    psS32           p6_id,
+} stackRunRow;
+
+/** Creates a new stackRunRow object
+ *
+ *  @return A new stackRunRow object or NULL on failure.
+ */
+
+stackRunRow *stackRunRowAlloc(
+    psS32           stack_id,
     const char      *state,
     const char      *workdir,
@@ -8360,19 +8360,19 @@
 );
 
-/** Creates a new p6Run table
- *
- * @return true on success
- */
-
-bool p6RunCreateTable(
+/** Creates a new stackRun table
+ *
+ * @return true on success
+ */
+
+bool stackRunCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p6Run table
- *
- * @return true on success
- */
-
-bool p6RunDropTable(
+/** Deletes a stackRun table
+ *
+ * @return true on success
+ */
+
+bool stackRunDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -8385,7 +8385,7 @@
  */
 
-bool p6RunInsert(
-    psDB            *dbh,               ///< Database handle
-    psS32           p6_id,
+bool stackRunInsert(
+    psDB            *dbh,               ///< Database handle
+    psS32           stack_id,
     const char      *state,
     const char      *workdir,
@@ -8401,5 +8401,5 @@
  */
 
-long long p6RunDelete(
+long long stackRunDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -8407,5 +8407,5 @@
 );
 
-/** Insert a single p6RunRow object into a table
+/** Insert a single stackRunRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -8414,10 +8414,10 @@
  */
 
-bool p6RunInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p6RunRow        *object             ///< p6RunRow object
-);
-
-/** Insert an array of p6RunRow object into a table
+bool stackRunInsertObject(
+    psDB            *dbh,               ///< Database handle
+    stackRunRow     *object             ///< stackRunRow object
+);
+
+/** Insert an array of stackRunRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -8426,10 +8426,10 @@
  */
 
-bool p6RunInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p6RunRow objects
-);
-
-/** Insert data from a binary FITS table p6RunRow into the database
+bool stackRunInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of stackRunRow objects
+);
+
+/** Insert data from a binary FITS table stackRunRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -8441,5 +8441,5 @@
  */
 
-bool p6RunInsertFits(
+bool stackRunInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -8456,5 +8456,5 @@
  */
 
-bool p6RunSelectRowsFits(
+bool stackRunSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -8463,22 +8463,22 @@
 );
 
-/** Convert a p6RunRow into an equivalent psMetadata
+/** Convert a stackRunRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p6RunMetadataFromObject(
-    const p6RunRow  *object             ///< fooRow to convert into a psMetadata
+psMetadata *stackRunMetadataFromObject(
+    const stackRunRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p6RunRow pointer or NULL on error
- */
-
-p6RunRow *p6RunObjectFromMetadata(
+ * @return A stackRunRow pointer or NULL on error
+ */
+
+stackRunRow *stackRunObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p6RunRow objects in a psArray
+/** Selects up to limit rows from the database and returns as stackRunRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -8487,10 +8487,10 @@
  */
 
-psArray *p6RunSelectRowObjects(
+psArray *stackRunSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p6Run
+/** Deletes a row from the database coresponding to an stackRun
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -8500,7 +8500,7 @@
  */
 
-bool p6RunDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p6RunRow *object    ///< Object to delete
+bool stackRunDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const stackRunRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -8512,10 +8512,10 @@
  */
 
-long long p6RunDeleteRowObjects(
+long long stackRunDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p6RunRow objects
+/** Formats and prints an array of stackRunRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -8525,10 +8525,10 @@
  */
 
-bool p6RunPrintObjects(
+bool stackRunPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p6RunRow objects
+    psArray         *objects,           ///< An array of stackRunRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p6RunRow object
+/** Formats and prints an stackRunRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -8538,44 +8538,44 @@
  */
 
-bool p6RunPrintObject(
+bool stackRunPrintObject(
     FILE            *stream,            ///< a stream
-    p6RunRow *object,    ///< an p6RunRow object
+    stackRunRow *object,    ///< an stackRunRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p6InputSkyfileRow data structure
- *
- * Structure for representing a single row of p6InputSkyfile table data.
+/** stackInputSkyfileRow data structure
+ *
+ * Structure for representing a single row of stackInputSkyfile table data.
  */
 
 typedef struct {
-    psS32           p6_id;
-    psS32           p4_id;
-} p6InputSkyfileRow;
-
-/** Creates a new p6InputSkyfileRow object
- *
- *  @return A new p6InputSkyfileRow object or NULL on failure.
- */
-
-p6InputSkyfileRow *p6InputSkyfileRowAlloc(
-    psS32           p6_id,
-    psS32           p4_id
-);
-
-/** Creates a new p6InputSkyfile table
- *
- * @return true on success
- */
-
-bool p6InputSkyfileCreateTable(
+    psS32           stack_id;
+    psS32           warp_id;
+} stackInputSkyfileRow;
+
+/** Creates a new stackInputSkyfileRow object
+ *
+ *  @return A new stackInputSkyfileRow object or NULL on failure.
+ */
+
+stackInputSkyfileRow *stackInputSkyfileRowAlloc(
+    psS32           stack_id,
+    psS32           warp_id
+);
+
+/** Creates a new stackInputSkyfile table
+ *
+ * @return true on success
+ */
+
+bool stackInputSkyfileCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p6InputSkyfile table
- *
- * @return true on success
- */
-
-bool p6InputSkyfileDropTable(
+/** Deletes a stackInputSkyfile table
+ *
+ * @return true on success
+ */
+
+bool stackInputSkyfileDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -8588,8 +8588,8 @@
  */
 
-bool p6InputSkyfileInsert(
-    psDB            *dbh,               ///< Database handle
-    psS32           p6_id,
-    psS32           p4_id
+bool stackInputSkyfileInsert(
+    psDB            *dbh,               ///< Database handle
+    psS32           stack_id,
+    psS32           warp_id
 );
 
@@ -8599,5 +8599,5 @@
  */
 
-long long p6InputSkyfileDelete(
+long long stackInputSkyfileDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -8605,5 +8605,5 @@
 );
 
-/** Insert a single p6InputSkyfileRow object into a table
+/** Insert a single stackInputSkyfileRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -8612,10 +8612,10 @@
  */
 
-bool p6InputSkyfileInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p6InputSkyfileRow *object             ///< p6InputSkyfileRow object
-);
-
-/** Insert an array of p6InputSkyfileRow object into a table
+bool stackInputSkyfileInsertObject(
+    psDB            *dbh,               ///< Database handle
+    stackInputSkyfileRow *object             ///< stackInputSkyfileRow object
+);
+
+/** Insert an array of stackInputSkyfileRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -8624,10 +8624,10 @@
  */
 
-bool p6InputSkyfileInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p6InputSkyfileRow objects
-);
-
-/** Insert data from a binary FITS table p6InputSkyfileRow into the database
+bool stackInputSkyfileInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of stackInputSkyfileRow objects
+);
+
+/** Insert data from a binary FITS table stackInputSkyfileRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -8639,5 +8639,5 @@
  */
 
-bool p6InputSkyfileInsertFits(
+bool stackInputSkyfileInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -8654,5 +8654,5 @@
  */
 
-bool p6InputSkyfileSelectRowsFits(
+bool stackInputSkyfileSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -8661,22 +8661,22 @@
 );
 
-/** Convert a p6InputSkyfileRow into an equivalent psMetadata
+/** Convert a stackInputSkyfileRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p6InputSkyfileMetadataFromObject(
-    const p6InputSkyfileRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *stackInputSkyfileMetadataFromObject(
+    const stackInputSkyfileRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p6InputSkyfileRow pointer or NULL on error
- */
-
-p6InputSkyfileRow *p6InputSkyfileObjectFromMetadata(
+ * @return A stackInputSkyfileRow pointer or NULL on error
+ */
+
+stackInputSkyfileRow *stackInputSkyfileObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p6InputSkyfileRow objects in a psArray
+/** Selects up to limit rows from the database and returns as stackInputSkyfileRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -8685,10 +8685,10 @@
  */
 
-psArray *p6InputSkyfileSelectRowObjects(
+psArray *stackInputSkyfileSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p6InputSkyfile
+/** Deletes a row from the database coresponding to an stackInputSkyfile
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -8698,7 +8698,7 @@
  */
 
-bool p6InputSkyfileDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p6InputSkyfileRow *object    ///< Object to delete
+bool stackInputSkyfileDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const stackInputSkyfileRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -8710,10 +8710,10 @@
  */
 
-long long p6InputSkyfileDeleteRowObjects(
+long long stackInputSkyfileDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p6InputSkyfileRow objects
+/** Formats and prints an array of stackInputSkyfileRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -8723,10 +8723,10 @@
  */
 
-bool p6InputSkyfilePrintObjects(
+bool stackInputSkyfilePrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p6InputSkyfileRow objects
+    psArray         *objects,           ///< An array of stackInputSkyfileRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p6InputSkyfileRow object
+/** Formats and prints an stackInputSkyfileRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -8736,28 +8736,28 @@
  */
 
-bool p6InputSkyfilePrintObject(
+bool stackInputSkyfilePrintObject(
     FILE            *stream,            ///< a stream
-    p6InputSkyfileRow *object,    ///< an p6InputSkyfileRow object
+    stackInputSkyfileRow *object,    ///< an stackInputSkyfileRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** p6SumSkyfileRow data structure
- *
- * Structure for representing a single row of p6SumSkyfile table data.
+/** stackSumSkyfileRow data structure
+ *
+ * Structure for representing a single row of stackSumSkyfile table data.
  */
 
 typedef struct {
-    psS32           p6_id;
+    psS32           stack_id;
     char            *uri;
     psF64           bg;
     psF64           bg_mean_stdev;
-} p6SumSkyfileRow;
-
-/** Creates a new p6SumSkyfileRow object
- *
- *  @return A new p6SumSkyfileRow object or NULL on failure.
- */
-
-p6SumSkyfileRow *p6SumSkyfileRowAlloc(
-    psS32           p6_id,
+} stackSumSkyfileRow;
+
+/** Creates a new stackSumSkyfileRow object
+ *
+ *  @return A new stackSumSkyfileRow object or NULL on failure.
+ */
+
+stackSumSkyfileRow *stackSumSkyfileRowAlloc(
+    psS32           stack_id,
     const char      *uri,
     psF64           bg,
@@ -8765,19 +8765,19 @@
 );
 
-/** Creates a new p6SumSkyfile table
- *
- * @return true on success
- */
-
-bool p6SumSkyfileCreateTable(
+/** Creates a new stackSumSkyfile table
+ *
+ * @return true on success
+ */
+
+bool stackSumSkyfileCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a p6SumSkyfile table
- *
- * @return true on success
- */
-
-bool p6SumSkyfileDropTable(
+/** Deletes a stackSumSkyfile table
+ *
+ * @return true on success
+ */
+
+bool stackSumSkyfileDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -8790,7 +8790,7 @@
  */
 
-bool p6SumSkyfileInsert(
-    psDB            *dbh,               ///< Database handle
-    psS32           p6_id,
+bool stackSumSkyfileInsert(
+    psDB            *dbh,               ///< Database handle
+    psS32           stack_id,
     const char      *uri,
     psF64           bg,
@@ -8803,5 +8803,5 @@
  */
 
-long long p6SumSkyfileDelete(
+long long stackSumSkyfileDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -8809,5 +8809,5 @@
 );
 
-/** Insert a single p6SumSkyfileRow object into a table
+/** Insert a single stackSumSkyfileRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -8816,10 +8816,10 @@
  */
 
-bool p6SumSkyfileInsertObject(
-    psDB            *dbh,               ///< Database handle
-    p6SumSkyfileRow *object             ///< p6SumSkyfileRow object
-);
-
-/** Insert an array of p6SumSkyfileRow object into a table
+bool stackSumSkyfileInsertObject(
+    psDB            *dbh,               ///< Database handle
+    stackSumSkyfileRow *object             ///< stackSumSkyfileRow object
+);
+
+/** Insert an array of stackSumSkyfileRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -8828,10 +8828,10 @@
  */
 
-bool p6SumSkyfileInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of p6SumSkyfileRow objects
-);
-
-/** Insert data from a binary FITS table p6SumSkyfileRow into the database
+bool stackSumSkyfileInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of stackSumSkyfileRow objects
+);
+
+/** Insert data from a binary FITS table stackSumSkyfileRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -8843,5 +8843,5 @@
  */
 
-bool p6SumSkyfileInsertFits(
+bool stackSumSkyfileInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -8858,5 +8858,5 @@
  */
 
-bool p6SumSkyfileSelectRowsFits(
+bool stackSumSkyfileSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -8865,22 +8865,22 @@
 );
 
-/** Convert a p6SumSkyfileRow into an equivalent psMetadata
+/** Convert a stackSumSkyfileRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *p6SumSkyfileMetadataFromObject(
-    const p6SumSkyfileRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *stackSumSkyfileMetadataFromObject(
+    const stackSumSkyfileRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A p6SumSkyfileRow pointer or NULL on error
- */
-
-p6SumSkyfileRow *p6SumSkyfileObjectFromMetadata(
+ * @return A stackSumSkyfileRow pointer or NULL on error
+ */
+
+stackSumSkyfileRow *stackSumSkyfileObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as p6SumSkyfileRow objects in a psArray
+/** Selects up to limit rows from the database and returns as stackSumSkyfileRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -8889,10 +8889,10 @@
  */
 
-psArray *p6SumSkyfileSelectRowObjects(
+psArray *stackSumSkyfileSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an p6SumSkyfile
+/** Deletes a row from the database coresponding to an stackSumSkyfile
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -8902,7 +8902,7 @@
  */
 
-bool p6SumSkyfileDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const p6SumSkyfileRow *object    ///< Object to delete
+bool stackSumSkyfileDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const stackSumSkyfileRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -8914,10 +8914,10 @@
  */
 
-long long p6SumSkyfileDeleteRowObjects(
+long long stackSumSkyfileDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of p6SumSkyfileRow objects
+/** Formats and prints an array of stackSumSkyfileRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -8927,10 +8927,10 @@
  */
 
-bool p6SumSkyfilePrintObjects(
+bool stackSumSkyfilePrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of p6SumSkyfileRow objects
+    psArray         *objects,           ///< An array of stackSumSkyfileRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an p6SumSkyfileRow object
+/** Formats and prints an stackSumSkyfileRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -8940,7 +8940,7 @@
  */
 
-bool p6SumSkyfilePrintObject(
+bool stackSumSkyfilePrintObject(
     FILE            *stream,            ///< a stream
-    p6SumSkyfileRow *object,    ///< an p6SumSkyfileRow object
+    stackSumSkyfileRow *object,    ///< an stackSumSkyfileRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
@@ -8952,3 +8952,3 @@
 #endif
 
-#endif // P6SUMSKYFILE_DB_H
+#endif // STACKSUMSKYFILE_DB_H
