Index: /branches/jhoblitt/ippdb/configure.ac
===================================================================
--- /branches/jhoblitt/ippdb/configure.ac	(revision 8025)
+++ /branches/jhoblitt/ippdb/configure.ac	(revision 8026)
@@ -1,5 +1,5 @@
 AC_PREREQ(2.59)
 
-AC_INIT([ippdb], [0.0.4], [pan-starrs.ifa.hawaii.edu])
+AC_INIT([ippdb], [0.0.5], [pan-starrs.ifa.hawaii.edu])
 AC_CONFIG_SRCDIR([ippdb.pc.in])
 
Index: /branches/jhoblitt/ippdb/src/ippdb.c
===================================================================
--- /branches/jhoblitt/ippdb/src/ippdb.c	(revision 8025)
+++ /branches/jhoblitt/ippdb/src/ippdb.c	(revision 8026)
@@ -4670,5 +4670,5 @@
 static void pzPendingImfileRowFree(pzPendingImfileRow *object);
 
-pzPendingImfileRow *pzPendingImfileRowAlloc(const char *exp_id, psS32 bytes, const char *md5sum, const char *class_id, const char *uri)
+pzPendingImfileRow *pzPendingImfileRowAlloc(const char *exp_id, psS32 bytes, const char *md5sum, const char *class, const char *class_id, const char *uri)
 {
     pzPendingImfileRow *object;
@@ -4680,4 +4680,5 @@
     object->bytes = bytes;
     object->md5sum = psStringCopy(md5sum);
+    object->class = psStringCopy(class);
     object->class_id = psStringCopy(class_id);
     object->uri = psStringCopy(uri);
@@ -4690,4 +4691,5 @@
     psFree(object->exp_id);
     psFree(object->md5sum);
+    psFree(object->class);
     psFree(object->class_id);
     psFree(object->uri);
@@ -4720,4 +4722,9 @@
         return false;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");
@@ -4743,5 +4750,5 @@
 }
 
-bool pzPendingImfileInsert(psDB * dbh, const char *exp_id, psS32 bytes, const char *md5sum, const char *class_id, const char *uri)
+bool pzPendingImfileInsert(psDB * dbh, const char *exp_id, psS32 bytes, const char *md5sum, const char *class, const char *class_id, const char *uri)
 {
     psMetadata      *md;
@@ -4764,4 +4771,9 @@
         return false;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, class_id)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");
@@ -4781,5 +4793,5 @@
 }
 
-bool pzPendingImfilePop(psDB *dbh, char **exp_id, psS32 *bytes, char **md5sum, char **class_id, char **uri)
+bool pzPendingImfilePop(psDB *dbh, char **exp_id, psS32 *bytes, char **md5sum, char **class, char **class_id, char **uri)
 {
     psArray         *rowSet;
@@ -4843,4 +4855,10 @@
         return false;
     }
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
     *class_id = psMetadataLookupPtr(&status, row, "class_id");
     if (!status) {
@@ -4863,5 +4881,5 @@
 bool pzPendingImfileInsertObject(psDB *dbh, pzPendingImfileRow *object)
 {
-    return pzPendingImfileInsert(dbh, object->exp_id, object->bytes, object->md5sum, object->class_id, object->uri);
+    return pzPendingImfileInsert(dbh, object->exp_id, object->bytes, object->md5sum, object->class, object->class_id, object->uri);
 }
 
@@ -4871,13 +4889,14 @@
     psS32           bytes;
     char            md5sum[256];
+    char            class[256];
     char            class_id[256];
     char            uri[256];
 
-    if (!pzPendingImfilePop(dbh, (char **)&exp_id, &bytes, (char **)&md5sum, (char **)&class_id, (char **)&uri)) {
+    if (!pzPendingImfilePop(dbh, (char **)&exp_id, &bytes, (char **)&md5sum, (char **)&class, (char **)&class_id, (char **)&uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return pzPendingImfileRowAlloc(exp_id, bytes, md5sum, class_id, uri);
+    return pzPendingImfileRowAlloc(exp_id, bytes, md5sum, class, class_id, uri);
 }
 
@@ -4993,4 +5012,9 @@
         return NULL;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
     if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, object->class_id)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");
@@ -5013,4 +5037,5 @@
     psS32           bytes;
     char            *md5sum;
+    char            *class;
     char            *class_id;
     char            *uri;
@@ -5031,4 +5056,9 @@
         return false;
     }
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
     class_id = psMetadataLookupPtr(&status, md, "class_id");
     if (!status) {
@@ -5042,5 +5072,5 @@
     }
 
-    return pzPendingImfileRowAlloc(exp_id, bytes, md5sum, class_id, uri);
+    return pzPendingImfileRowAlloc(exp_id, bytes, md5sum, class, class_id, uri);
 }
 psArray *pzPendingImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -5530,5 +5560,5 @@
 static void newImfileRowFree(newImfileRow *object);
 
-newImfileRow *newImfileRowAlloc(const char *exp_id, const char *class_id, const char *uri)
+newImfileRow *newImfileRowAlloc(const char *exp_id, const char *class, const char *class_id, const char *uri)
 {
     newImfileRow    *object;
@@ -5538,4 +5568,5 @@
 
     object->exp_id = psStringCopy(exp_id);
+    object->class = psStringCopy(class);
     object->class_id = psStringCopy(class_id);
     object->uri = psStringCopy(uri);
@@ -5547,4 +5578,5 @@
 {
     psFree(object->exp_id);
+    psFree(object->class);
     psFree(object->class_id);
     psFree(object->uri);
@@ -5567,4 +5599,9 @@
         return false;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");
@@ -5590,5 +5627,5 @@
 }
 
-bool newImfileInsert(psDB * dbh, const char *exp_id, const char *class_id, const char *uri)
+bool newImfileInsert(psDB * dbh, const char *exp_id, const char *class, const char *class_id, const char *uri)
 {
     psMetadata      *md;
@@ -5601,4 +5638,9 @@
         return false;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, class_id)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");
@@ -5618,5 +5660,5 @@
 }
 
-bool newImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri)
+bool newImfilePop(psDB *dbh, char **exp_id, char **class, char **class_id, char **uri)
 {
     psArray         *rowSet;
@@ -5668,4 +5710,10 @@
         return false;
     }
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
     *class_id = psMetadataLookupPtr(&status, row, "class_id");
     if (!status) {
@@ -5688,5 +5736,5 @@
 bool newImfileInsertObject(psDB *dbh, newImfileRow *object)
 {
-    return newImfileInsert(dbh, object->exp_id, object->class_id, object->uri);
+    return newImfileInsert(dbh, object->exp_id, object->class, object->class_id, object->uri);
 }
 
@@ -5694,13 +5742,14 @@
 {
     char            exp_id[256];
+    char            class[256];
     char            class_id[256];
     char            uri[256];
 
-    if (!newImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri)) {
+    if (!newImfilePop(dbh, (char **)&exp_id, (char **)&class, (char **)&class_id, (char **)&uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return newImfileRowAlloc(exp_id, class_id, uri);
+    return newImfileRowAlloc(exp_id, class, class_id, uri);
 }
 
@@ -5806,4 +5855,9 @@
         return NULL;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
     if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, object->class_id)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");
@@ -5824,4 +5878,5 @@
     bool            status;
     char            *exp_id;
+    char            *class;
     char            *class_id;
     char            *uri;
@@ -5832,4 +5887,9 @@
         return false;
     }
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
     class_id = psMetadataLookupPtr(&status, md, "class_id");
     if (!status) {
@@ -5843,5 +5903,5 @@
     }
 
-    return newImfileRowAlloc(exp_id, class_id, uri);
+    return newImfileRowAlloc(exp_id, class, class_id, uri);
 }
 psArray *newImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -6881,5 +6941,5 @@
 static void rawImfileRowFree(rawImfileRow *object);
 
-rawImfileRow *rawImfileRowAlloc(const char *exp_id, const char *class_id, const char *uri, const char *stats)
+rawImfileRow *rawImfileRowAlloc(const char *exp_id, const char *class, const char *class_id, const char *uri, const char *stats)
 {
     rawImfileRow    *object;
@@ -6889,4 +6949,5 @@
 
     object->exp_id = psStringCopy(exp_id);
+    object->class = psStringCopy(class);
     object->class_id = psStringCopy(class_id);
     object->uri = psStringCopy(uri);
@@ -6899,4 +6960,5 @@
 {
     psFree(object->exp_id);
+    psFree(object->class);
     psFree(object->class_id);
     psFree(object->uri);
@@ -6920,4 +6982,9 @@
         return false;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");
@@ -6948,5 +7015,5 @@
 }
 
-bool rawImfileInsert(psDB * dbh, const char *exp_id, const char *class_id, const char *uri, const char *stats)
+bool rawImfileInsert(psDB * dbh, const char *exp_id, const char *class, const char *class_id, const char *uri, const char *stats)
 {
     psMetadata      *md;
@@ -6959,4 +7026,9 @@
         return false;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, class_id)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");
@@ -6981,5 +7053,5 @@
 }
 
-bool rawImfilePop(psDB *dbh, char **exp_id, char **class_id, char **uri, char **stats)
+bool rawImfilePop(psDB *dbh, char **exp_id, char **class, char **class_id, char **uri, char **stats)
 {
     psArray         *rowSet;
@@ -7031,4 +7103,10 @@
         return false;
     }
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
     *class_id = psMetadataLookupPtr(&status, row, "class_id");
     if (!status) {
@@ -7057,5 +7135,5 @@
 bool rawImfileInsertObject(psDB *dbh, rawImfileRow *object)
 {
-    return rawImfileInsert(dbh, object->exp_id, object->class_id, object->uri, object->stats);
+    return rawImfileInsert(dbh, object->exp_id, object->class, object->class_id, object->uri, object->stats);
 }
 
@@ -7063,14 +7141,15 @@
 {
     char            exp_id[256];
+    char            class[256];
     char            class_id[256];
     char            uri[256];
     char            stats[256];
 
-    if (!rawImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&stats)) {
+    if (!rawImfilePop(dbh, (char **)&exp_id, (char **)&class, (char **)&class_id, (char **)&uri, (char **)&stats)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return rawImfileRowAlloc(exp_id, class_id, uri, stats);
+    return rawImfileRowAlloc(exp_id, class, class_id, uri, stats);
 }
 
@@ -7176,4 +7255,9 @@
         return NULL;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
     if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, object->class_id)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");
@@ -7199,4 +7283,5 @@
     bool            status;
     char            *exp_id;
+    char            *class;
     char            *class_id;
     char            *uri;
@@ -7208,4 +7293,9 @@
         return false;
     }
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
     class_id = psMetadataLookupPtr(&status, md, "class_id");
     if (!status) {
@@ -7224,5 +7314,5 @@
     }
 
-    return rawImfileRowAlloc(exp_id, class_id, uri, stats);
+    return rawImfileRowAlloc(exp_id, class, class_id, uri, stats);
 }
 psArray *rawImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
Index: /branches/jhoblitt/ippdb/src/ippdb.h
===================================================================
--- /branches/jhoblitt/ippdb/src/ippdb.h	(revision 8025)
+++ /branches/jhoblitt/ippdb/src/ippdb.h	(revision 8026)
@@ -1914,4 +1914,5 @@
     psS32           bytes;
     char            *md5sum;
+    char            *class;
     char            *class_id;
     char            *uri;
@@ -1927,4 +1928,5 @@
     psS32           bytes,
     const char      *md5sum,
+    const char      *class,
     const char      *class_id,
     const char      *uri
@@ -1961,4 +1963,5 @@
     psS32           bytes,
     const char      *md5sum,
+    const char      *class,
     const char      *class_id,
     const char      *uri
@@ -1975,4 +1978,5 @@
     psS32           *bytes,
     char            **md5sum,
+    char            **class,
     char            **class_id,
     char            **uri
@@ -2278,4 +2282,5 @@
 typedef struct {
     char            *exp_id;
+    char            *class;
     char            *class_id;
     char            *uri;
@@ -2289,4 +2294,5 @@
 newImfileRow *newImfileRowAlloc(
     const char      *exp_id,
+    const char      *class,
     const char      *class_id,
     const char      *uri
@@ -2321,4 +2327,5 @@
     psDB            *dbh,               ///< Database handle
     const char      *exp_id,
+    const char      *class,
     const char      *class_id,
     const char      *uri
@@ -2333,4 +2340,5 @@
     psDB            *dbh,               ///< Database handle
     char            **exp_id,
+    char            **class,
     char            **class_id,
     char            **uri
@@ -2835,4 +2843,5 @@
 typedef struct {
     char            *exp_id;
+    char            *class;
     char            *class_id;
     char            *uri;
@@ -2847,4 +2856,5 @@
 rawImfileRow *rawImfileRowAlloc(
     const char      *exp_id,
+    const char      *class,
     const char      *class_id,
     const char      *uri,
@@ -2880,4 +2890,5 @@
     psDB            *dbh,               ///< Database handle
     const char      *exp_id,
+    const char      *class,
     const char      *class_id,
     const char      *uri,
@@ -2893,4 +2904,5 @@
     psDB            *dbh,               ///< Database handle
     char            **exp_id,
+    char            **class,
     char            **class_id,
     char            **uri,
Index: /branches/jhoblitt/ippdb/tests/alloc.c
===================================================================
--- /branches/jhoblitt/ippdb/tests/alloc.c	(revision 8025)
+++ /branches/jhoblitt/ippdb/tests/alloc.c	(revision 8026)
@@ -384,5 +384,5 @@
         pzPendingImfileRow *object;
 
-        object = pzPendingImfileRowAlloc("a string", -32, "a string", "a string", "a string"    );
+        object = pzPendingImfileRowAlloc("a string", -32, "a string", "a string", "a string", "a string"    );
 
         if (!object) {
@@ -402,4 +402,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -450,11 +454,15 @@
         newImfileRow    *object;
 
-        object = newImfileRowAlloc("a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
+        object = newImfileRowAlloc("a string", "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -557,11 +565,15 @@
         rawImfileRow    *object;
 
-        object = rawImfileRowAlloc("a string", "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
+        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
Index: /branches/jhoblitt/ippdb/tests/insert.c
===================================================================
--- /branches/jhoblitt/ippdb/tests/insert.c	(revision 8025)
+++ /branches/jhoblitt/ippdb/tests/insert.c	(revision 8026)
@@ -163,5 +163,5 @@
         }
 
-        if (!pzPendingImfileInsert(dbh, "a string", -32, "a string", "a string", "a string")) {
+        if (!pzPendingImfileInsert(dbh, "a string", -32, "a string", "a string", "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
@@ -193,5 +193,5 @@
         }
 
-        if (!newImfileInsert(dbh, "a string", "a string", "a string")) {
+        if (!newImfileInsert(dbh, "a string", "a string", "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
@@ -238,5 +238,5 @@
         }
 
-        if (!rawImfileInsert(dbh, "a string", "a string", "a string", "a string")) {
+        if (!rawImfileInsert(dbh, "a string", "a string", "a string", "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
Index: /branches/jhoblitt/ippdb/tests/insertobject.c
===================================================================
--- /branches/jhoblitt/ippdb/tests/insertobject.c	(revision 8025)
+++ /branches/jhoblitt/ippdb/tests/insertobject.c	(revision 8026)
@@ -234,5 +234,5 @@
         }
 
-        object = pzPendingImfileRowAlloc("a string", -32, "a string", "a string", "a string");
+        object = pzPendingImfileRowAlloc("a string", -32, "a string", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -278,5 +278,5 @@
         }
 
-        object = newImfileRowAlloc("a string", "a string", "a string");
+        object = newImfileRowAlloc("a string", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -344,5 +344,5 @@
         }
 
-        object = rawImfileRowAlloc("a string", "a string", "a string", "a string");
+        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
Index: /branches/jhoblitt/ippdb/tests/metadatafromobject.c
===================================================================
--- /branches/jhoblitt/ippdb/tests/metadatafromobject.c	(revision 8025)
+++ /branches/jhoblitt/ippdb/tests/metadatafromobject.c	(revision 8026)
@@ -467,5 +467,5 @@
         bool            status;
 
-        object = pzPendingImfileRowAlloc("a string", -32, "a string", "a string", "a string");
+        object = pzPendingImfileRowAlloc("a string", -32, "a string", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -491,4 +491,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -549,5 +553,5 @@
         bool            status;
 
-        object = newImfileRowAlloc("a string", "a string", "a string");
+        object = newImfileRowAlloc("a string", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -565,4 +569,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -680,5 +688,5 @@
         bool            status;
 
-        object = rawImfileRowAlloc("a string", "a string", "a string", "a string");
+        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -693,4 +701,8 @@
 
         if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
Index: /branches/jhoblitt/ippdb/tests/objectfrommetadata.c
===================================================================
--- /branches/jhoblitt/ippdb/tests/objectfrommetadata.c	(revision 8025)
+++ /branches/jhoblitt/ippdb/tests/objectfrommetadata.c	(revision 8026)
@@ -693,4 +693,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
             psFree(md);
@@ -722,4 +726,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -801,4 +809,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
             psFree(md);
@@ -822,4 +834,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -991,4 +1007,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
             psFree(md);
@@ -1013,4 +1033,8 @@
 
         if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
Index: /branches/jhoblitt/ippdb/tests/pop.c
===================================================================
--- /branches/jhoblitt/ippdb/tests/pop.c	(revision 8025)
+++ /branches/jhoblitt/ippdb/tests/pop.c	(revision 8026)
@@ -221,13 +221,14 @@
         psS32           bytes;
         char            md5sum[256];
-        char            class_id[256];
-        char            uri[256];
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!pzPendingImfilePop(dbh, (char **)&exp_id, &bytes, (char **)&md5sum, (char **)&class_id, (char **)&uri)) { 
+        char            class[256];
+        char            class_id[256];
+        char            uri[256];
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!pzPendingImfilePop(dbh, (char **)&exp_id, &bytes, (char **)&md5sum, (char **)&class, (char **)&class_id, (char **)&uri)) { 
             exit(EXIT_FAILURE);
         }
@@ -259,13 +260,14 @@
         psDB            *dbh;
         char            exp_id[256];
-        char            class_id[256];
-        char            uri[256];
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!newImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri)) { 
+        char            class[256];
+        char            class_id[256];
+        char            uri[256];
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!newImfilePop(dbh, (char **)&exp_id, (char **)&class, (char **)&class_id, (char **)&uri)) { 
             exit(EXIT_FAILURE);
         }
@@ -321,14 +323,15 @@
         psDB            *dbh;
         char            exp_id[256];
-        char            class_id[256];
-        char            uri[256];
-        char            stats[256];
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!rawImfilePop(dbh, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&stats)) { 
+        char            class[256];
+        char            class_id[256];
+        char            uri[256];
+        char            stats[256];
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!rawImfilePop(dbh, (char **)&exp_id, (char **)&class, (char **)&class_id, (char **)&uri, (char **)&stats)) { 
             exit(EXIT_FAILURE);
         }
Index: /trunk/ippdb/configure.ac
===================================================================
--- /trunk/ippdb/configure.ac	(revision 8025)
+++ /trunk/ippdb/configure.ac	(revision 8026)
@@ -1,5 +1,5 @@
 AC_PREREQ(2.59)
 
-AC_INIT([ippdb], [0.0.4], [pan-starrs.ifa.hawaii.edu])
+AC_INIT([ippdb], [0.0.5], [pan-starrs.ifa.hawaii.edu])
 AC_CONFIG_SRCDIR([ippdb.pc.in])
 
