Index: trunk/SConstruct
===================================================================
--- trunk/SConstruct	(revision 202)
+++ trunk/SConstruct	(revision 203)
@@ -17,5 +17,5 @@
 # Libraries
 libregfi_static = env.Library(lib_src)
-libregfi = env.SharedLibrary(lib_src, LIBS=['m','pthread'])
+libregfi = env.SharedLibrary(lib_src, LIBS=['m','pthread', 'talloc'])
 
 
Index: trunk/include/regfi.h
===================================================================
--- trunk/include/regfi.h	(revision 202)
+++ trunk/include/regfi.h	(revision 203)
@@ -553,5 +553,5 @@
    */
   bool     data_in_offset;
-} REGFI_VK_REC;
+} REGFI_VK;
 
 
@@ -593,5 +593,5 @@
   /** The magic number for this record (should be "sk") */
   uint8_t  magic[REGFI_CELL_MAGIC_SIZE];
-} REGFI_SK_REC;
+} REGFI_SK;
 
 
@@ -599,5 +599,5 @@
  * @ingroup regfiBase
  */
-typedef struct
+typedef struct _regfi_nk_rec
 {
   /** Real offset of this record's cell in the file */
@@ -688,5 +688,5 @@
   /** Virtual offset of SK record */
   uint32_t sk_off;
-} REGFI_NK_REC;
+} REGFI_NK;
 
 
@@ -719,29 +719,4 @@
 typedef struct _regfi_file
 {
-  /* Run-time information */
-  /************************/
-  /* Functions for accessing the file */
-  REGFI_RAW_FILE* cb;
-
-  /* Mutex for all cb access.  This is done to prevent one thread from moving
-   * the file offset while another thread is in the middle of a multi-read
-   * parsing transaction */
-  pthread_mutex_t cb_lock;
-
-  /* For sanity checking (not part of the registry header) */
-  uint32_t file_length;
-
-  /* Metadata about hbins */
-  range_list* hbins;
-
-  /* Multiple read access allowed, write access is exclusive */
-  pthread_rwlock_t hbins_lock;
-
-  /* SK record cached since they're repeatedly reused */
-  lru_cache* sk_cache;
-
-  /* Need exclusive access for LRUs, since lookups make changes */
-  pthread_mutex_t sk_lock;
-
   /* Data parsed from file header */
   /********************************/
@@ -794,4 +769,30 @@
   uint8_t reserved2[REGFI_REGF_RESERVED2_SIZE];
 
+
+  /* Run-time information */
+  /************************/
+  /* Functions for accessing the file */
+  REGFI_RAW_FILE* cb;
+
+  /* Mutex for all cb access.  This is done to prevent one thread from moving
+   * the file offset while another thread is in the middle of a multi-read
+   * parsing transaction */
+  pthread_mutex_t cb_lock;
+
+  /* For sanity checking (not part of the registry header) */
+  uint32_t file_length;
+
+  /* Metadata about hbins */
+  range_list* hbins;
+
+  /* Multiple read access allowed, write access is exclusive */
+  pthread_rwlock_t hbins_lock;
+
+  /* SK record cached since they're repeatedly reused */
+  lru_cache* sk_cache;
+
+  /* Need exclusive access for LRUs, since lookups make changes */
+  pthread_mutex_t sk_lock;
+
 } REGFI_FILE;
 
@@ -809,5 +810,5 @@
 
   /** The current key */
-  REGFI_NK_REC* cur_key;
+  REGFI_NK* cur_key;
 
   /** The encoding that all strings are converted to as set during iterator
@@ -826,5 +827,5 @@
 typedef struct _regfi_iter_position
 {
-  REGFI_NK_REC* nk;
+  REGFI_NK* nk;
   uint32_t cur_subkey;
   /* We could store a cur_value here as well, but didn't see 
@@ -939,5 +940,5 @@
 /** Frees a record previously returned by one of the API functions.
  *
- * Can be used to free REGFI_NK_REC, REGFI_VK_REC, REGFI_SK_REC, REGFI_DATA, and
+ * Can be used to free REGFI_NK, REGFI_VK, REGFI_SK, REGFI_DATA, and
  * REGFI_CLASSNAME records.
  *
@@ -1070,5 +1071,5 @@
  */
 _EXPORT
-const REGFI_NK_REC* regfi_iterator_cur_key(REGFI_ITERATOR* i);
+const REGFI_NK* regfi_iterator_cur_key(REGFI_ITERATOR* i);
 
 
@@ -1082,5 +1083,5 @@
  */
 _EXPORT
-const REGFI_SK_REC* regfi_iterator_cur_sk(REGFI_ITERATOR* i);
+const REGFI_SK* regfi_iterator_cur_sk(REGFI_ITERATOR* i);
 
 
@@ -1109,5 +1110,5 @@
  */
 _EXPORT
-const REGFI_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i);
+const REGFI_NK* regfi_iterator_cur_subkey(REGFI_ITERATOR* i);
 
 
@@ -1163,5 +1164,5 @@
  */
 _EXPORT
-const REGFI_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i);
+const REGFI_VK* regfi_iterator_cur_value(REGFI_ITERATOR* i);
 
 
@@ -1205,5 +1206,5 @@
 _EXPORT
 const REGFI_CLASSNAME* regfi_iterator_fetch_classname(REGFI_ITERATOR* i, 
-						      const REGFI_NK_REC* key);
+						      const REGFI_NK* key);
 
 
@@ -1220,5 +1221,5 @@
 _EXPORT
 const REGFI_DATA* regfi_iterator_fetch_data(REGFI_ITERATOR* i,
-					    const REGFI_VK_REC* value);
+					    const REGFI_VK* value);
 
 
@@ -1237,5 +1238,5 @@
  */
 _EXPORT
-REGFI_NK_REC* regfi_load_key(REGFI_FILE* file, uint32_t offset, 
+REGFI_NK* regfi_load_key(REGFI_FILE* file, uint32_t offset, 
 			     REGFI_ENCODING output_encoding, 
 			     bool strict);
@@ -1249,5 +1250,5 @@
  */
 _EXPORT
-REGFI_VK_REC* regfi_load_value(REGFI_FILE* file, uint32_t offset, 
+REGFI_VK* regfi_load_value(REGFI_FILE* file, uint32_t offset, 
 			       REGFI_ENCODING output_encoding, 
 			       bool strict);
@@ -1327,5 +1328,5 @@
  */
 _EXPORT
-const REGFI_SK_REC* regfi_load_sk(REGFI_FILE* file, uint32_t offset,
+const REGFI_SK* regfi_load_sk(REGFI_FILE* file, uint32_t offset,
 				  bool strict);
 
@@ -1369,5 +1370,5 @@
  */
 _EXPORT
-REGFI_NK_REC* regfi_parse_nk(REGFI_FILE* file, uint32_t offset,
+REGFI_NK* regfi_parse_nk(REGFI_FILE* file, uint32_t offset,
 			     uint32_t max_size, bool strict);
 
@@ -1391,5 +1392,5 @@
  */
 _EXPORT
-REGFI_VK_REC* regfi_parse_vk(REGFI_FILE* file, uint32_t offset, 
+REGFI_VK* regfi_parse_vk(REGFI_FILE* file, uint32_t offset, 
 			     uint32_t max_size, bool strict);
 
@@ -1402,5 +1403,5 @@
  */
 _EXPORT
-REGFI_SK_REC* regfi_parse_sk(REGFI_FILE* file, uint32_t offset, 
+REGFI_SK* regfi_parse_sk(REGFI_FILE* file, uint32_t offset, 
 			     uint32_t max_size, bool strict);
 
@@ -1469,5 +1470,5 @@
 /*    Private Functions                                                       */
 /******************************************************************************/
-REGFI_NK_REC*         regfi_rootkey(REGFI_FILE* file, 
+REGFI_NK*         regfi_rootkey(REGFI_FILE* file, 
 				    REGFI_ENCODING output_encoding);
 
@@ -1505,6 +1506,6 @@
 void                  regfi_add_message(REGFI_FILE* file, uint16_t msg_type, 
 					const char* fmt, ...);
-REGFI_NK_REC*         regfi_copy_nk(const REGFI_NK_REC* nk);
-REGFI_VK_REC*         regfi_copy_vk(const REGFI_VK_REC* vk);
+REGFI_NK*         regfi_copy_nk(const REGFI_NK* nk);
+REGFI_VK*         regfi_copy_vk(const REGFI_VK* vk);
 _EXPORT
 int32_t               regfi_calc_maxsize(REGFI_FILE* file, uint32_t offset);
@@ -1524,8 +1525,8 @@
 
 _EXPORT
-void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK_REC* nk, 
+void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK* nk, 
 			     REGFI_ENCODING output_encoding, bool strict);
 _EXPORT
-void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK_REC* vk, 
+void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK* vk, 
 			       REGFI_ENCODING output_encoding, bool strict);
 
Index: trunk/lib/regfi.c
===================================================================
--- trunk/lib/regfi.c	(revision 202)
+++ trunk/lib/regfi.c	(revision 203)
@@ -833,5 +833,7 @@
   }
   else if(buf[0] == 'l' && buf[1] == 'i')
+  {
     elem_size = sizeof(uint32_t);
+  }
   else if((buf[0] == 'l') && (buf[1] == 'f' || buf[1] == 'h'))
     elem_size = sizeof(REGFI_SUBKEY_LIST_ELEM);
@@ -973,8 +975,8 @@
  *
  ******************************************************************************/
-REGFI_SK_REC* regfi_parse_sk(REGFI_FILE* file, uint32_t offset, uint32_t max_size, 
+REGFI_SK* regfi_parse_sk(REGFI_FILE* file, uint32_t offset, uint32_t max_size, 
 			     bool strict)
 {
-  REGFI_SK_REC* ret_val = NULL;
+  REGFI_SK* ret_val = NULL;
   uint8_t* sec_desc_buf = NULL;
   uint32_t cell_length, length;
@@ -1000,5 +1002,5 @@
   }
 
-  ret_val = talloc(NULL, REGFI_SK_REC);
+  ret_val = talloc(NULL, REGFI_SK);
   if(ret_val == NULL)
     goto fail_locked;
@@ -1174,5 +1176,5 @@
 
 
-void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK_REC* vk, 
+void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK* vk, 
 			       REGFI_ENCODING output_encoding, bool strict)
 {
@@ -1224,8 +1226,8 @@
 /******************************************************************************
  ******************************************************************************/
-REGFI_VK_REC* regfi_load_value(REGFI_FILE* file, uint32_t offset, 
+REGFI_VK* regfi_load_value(REGFI_FILE* file, uint32_t offset, 
 			       REGFI_ENCODING output_encoding, bool strict)
 {
-  REGFI_VK_REC* ret_val = NULL;
+  REGFI_VK* ret_val = NULL;
   int32_t max_size;
 
@@ -1270,5 +1272,5 @@
 
 
-void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK_REC* nk, 
+void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK* nk, 
 			     REGFI_ENCODING output_encoding, bool strict)
 {
@@ -1319,8 +1321,8 @@
  *
  ******************************************************************************/
-REGFI_NK_REC* regfi_load_key(REGFI_FILE* file, uint32_t offset,
+REGFI_NK* regfi_load_key(REGFI_FILE* file, uint32_t offset,
 			     REGFI_ENCODING output_encoding, bool strict)
 {
-  REGFI_NK_REC* nk;
+  REGFI_NK* nk;
   uint32_t off;
   int32_t max_size;
@@ -1410,7 +1412,7 @@
 /******************************************************************************
  ******************************************************************************/
-const REGFI_SK_REC* regfi_load_sk(REGFI_FILE* file, uint32_t offset, bool strict)
-{
-  REGFI_SK_REC* ret_val = NULL;
+const REGFI_SK* regfi_load_sk(REGFI_FILE* file, uint32_t offset, bool strict)
+{
+  REGFI_SK* ret_val = NULL;
   int32_t max_size;
   void* failure_ptr = NULL;
@@ -1427,5 +1429,5 @@
 
   /* First look if we have already parsed it */
-  ret_val = (REGFI_SK_REC*)lru_cache_find(file->sk_cache, &offset, 4);
+  ret_val = (REGFI_SK*)lru_cache_find(file->sk_cache, &offset, 4);
 
   /* Bail out if we have previously cached a parse failure at this offset. */
@@ -1463,8 +1465,8 @@
 /******************************************************************************
  ******************************************************************************/
-REGFI_NK_REC* regfi_find_root_nk(REGFI_FILE* file, const REGFI_HBIN* hbin, 
+REGFI_NK* regfi_find_root_nk(REGFI_FILE* file, const REGFI_HBIN* hbin, 
 				 REGFI_ENCODING output_encoding)
 {
-  REGFI_NK_REC* nk = NULL;
+  REGFI_NK* nk = NULL;
   uint32_t cell_length;
   uint32_t cur_offset = hbin->file_off+REGFI_HBIN_HEADER_SIZE;
@@ -1576,10 +1578,10 @@
 
   /* Read file header */
-  if ((rb = regfi_parse_regf(file_cb, false)) == NULL) 
+  if ((rb = regfi_parse_regf(file_cb, false)) == NULL)
   {
     regfi_log_add(REGFI_LOG_ERROR, "Failed to read REGF block.");
     return NULL;
   }
-  rb->file_length = file_length;  
+  rb->file_length = file_length;
   rb->cb = file_cb;
 
@@ -1662,7 +1664,7 @@
  * rest of the file if that fails.
  ******************************************************************************/
-REGFI_NK_REC* regfi_rootkey(REGFI_FILE* file, REGFI_ENCODING output_encoding)
-{
-  REGFI_NK_REC* nk = NULL;
+REGFI_NK* regfi_rootkey(REGFI_FILE* file, REGFI_ENCODING output_encoding)
+{
+  REGFI_NK* nk = NULL;
   REGFI_HBIN* hbin;
   uint32_t root_offset, i, num_hbins;
@@ -1718,5 +1720,5 @@
 				   REGFI_ENCODING output_encoding)
 {
-  REGFI_NK_REC* root;
+  REGFI_NK* root;
   REGFI_ITERATOR* ret_val;
 
@@ -1773,5 +1775,5 @@
 bool regfi_iterator_down(REGFI_ITERATOR* i)
 {
-  REGFI_NK_REC* subkey;
+  REGFI_NK* subkey;
   REGFI_ITER_POSITION* pos;
 
@@ -1780,5 +1782,5 @@
     return false;
 
-  subkey = (REGFI_NK_REC*)regfi_iterator_cur_subkey(i);
+  subkey = (REGFI_NK*)regfi_iterator_cur_subkey(i);
   if(subkey == NULL)
   {
@@ -1840,5 +1842,5 @@
 bool regfi_iterator_find_subkey(REGFI_ITERATOR* i, const char* subkey_name)
 {
-  REGFI_NK_REC* subkey;
+  REGFI_NK* subkey;
   bool found = false;
   uint32_t old_subkey = i->cur_subkey;
@@ -1899,5 +1901,5 @@
 /******************************************************************************
  *****************************************************************************/
-const REGFI_NK_REC* regfi_iterator_cur_key(REGFI_ITERATOR* i)
+const REGFI_NK* regfi_iterator_cur_key(REGFI_ITERATOR* i)
 {
   return i->cur_key;
@@ -1907,5 +1909,5 @@
 /******************************************************************************
  *****************************************************************************/
-const REGFI_SK_REC* regfi_iterator_cur_sk(REGFI_ITERATOR* i)
+const REGFI_SK* regfi_iterator_cur_sk(REGFI_ITERATOR* i)
 {
   if(i->cur_key == NULL || i->cur_key->sk_off == REGFI_OFFSET_NONE)
@@ -1929,5 +1931,5 @@
 /******************************************************************************
  *****************************************************************************/
-const REGFI_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i)
+const REGFI_NK* regfi_iterator_cur_subkey(REGFI_ITERATOR* i)
 {
   uint32_t nk_offset;
@@ -1961,5 +1963,5 @@
 bool regfi_iterator_find_value(REGFI_ITERATOR* i, const char* value_name)
 {
-  const REGFI_VK_REC* cur;
+  const REGFI_VK* cur;
   bool found = false;
   uint32_t old_value = i->cur_value;
@@ -2007,7 +2009,7 @@
 /******************************************************************************
  *****************************************************************************/
-const REGFI_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i)
-{
-  REGFI_VK_REC* ret_val = NULL;
+const REGFI_VK* regfi_iterator_cur_value(REGFI_ITERATOR* i)
+{
+  REGFI_VK* ret_val = NULL;
   uint32_t voffset;
 
@@ -2037,5 +2039,5 @@
  *****************************************************************************/
 const REGFI_CLASSNAME* regfi_iterator_fetch_classname(REGFI_ITERATOR* i,
-						      const REGFI_NK_REC* key)
+						      const REGFI_NK* key)
 {
   REGFI_CLASSNAME* ret_val;
@@ -2101,5 +2103,5 @@
  *****************************************************************************/
 const REGFI_DATA* regfi_iterator_fetch_data(REGFI_ITERATOR* i, 
-					    const REGFI_VK_REC* value)
+					    const REGFI_VK* value)
 {
   REGFI_DATA* ret_val = NULL;
@@ -2565,13 +2567,13 @@
 /*******************************************************************
  *******************************************************************/
-REGFI_NK_REC* regfi_parse_nk(REGFI_FILE* file, uint32_t offset, 
-			     uint32_t max_size, bool strict)
+REGFI_NK* regfi_parse_nk(REGFI_FILE* file, uint32_t offset, 
+			 uint32_t max_size, bool strict)
 {
   uint8_t nk_header[REGFI_NK_MIN_LENGTH];
-  REGFI_NK_REC* ret_val;
+  REGFI_NK* ret_val;
   uint32_t length,cell_length;
   bool unalloc = false;
 
-  ret_val = talloc(NULL, REGFI_NK_REC);
+  ret_val = talloc(NULL, REGFI_NK);
   if(ret_val == NULL)
   {
@@ -2784,13 +2786,13 @@
 /******************************************************************************
 *******************************************************************************/
-REGFI_VK_REC* regfi_parse_vk(REGFI_FILE* file, uint32_t offset, 
+REGFI_VK* regfi_parse_vk(REGFI_FILE* file, uint32_t offset, 
 			     uint32_t max_size, bool strict)
 {
-  REGFI_VK_REC* ret_val;
+  REGFI_VK* ret_val;
   uint8_t vk_header[REGFI_VK_MIN_LENGTH];
   uint32_t raw_data_size, length, cell_length;
   bool unalloc = false;
 
-  ret_val = talloc(NULL, REGFI_VK_REC);
+  ret_val = talloc(NULL, REGFI_VK);
   if(ret_val == NULL)
     goto fail;
Index: trunk/python2/regfi/pyregfi.h
===================================================================
--- trunk/python2/regfi/pyregfi.h	(revision 202)
+++ trunk/python2/regfi/pyregfi.h	(revision 203)
@@ -37,6 +37,6 @@
 struct TreeIterator_t;
 
-BIND_STRUCT(REGFI_NK_REC)
-BIND_STRUCT(REGFI_VK_REC)
+BIND_STRUCT(REGFI_NK)
+BIND_STRUCT(REGFI_VK)
 BIND_STRUCT(REGFI_DATA)
 
@@ -44,7 +44,7 @@
 CLASS(RawData, Object)
     const REGFI_DATA *data;
-    const REGFI_VK_REC *rec;
+    const REGFI_VK *rec;
 
-    RawData METHOD(RawData, Con, REGFI_DATA *data, REGFI_VK_REC *record);
+    RawData METHOD(RawData, Con, REGFI_DATA *data, REGFI_VK *record);
 
     /** Return the raw buffer as a string. By default we only return
@@ -73,11 +73,14 @@
 				   char **path, REGFI_ENCODING encoding);
 
-/*     struct ValueIterator_t *METHOD(TreeIterator, list_values);*/
-
      void METHOD(TreeIterator, __iter__);
      struct RegistryKey_t *METHOD(TreeIterator, iternext);
 
+
      int METHOD(TreeIterator, down);
      int METHOD(TreeIterator, up);
+
+     struct RegistryKey_t *METHOD(TreeIterator, current);
+     int METHOD(TreeIterator, to_root);
+
 END_CLASS
 
@@ -86,8 +89,8 @@
 CLASS(RegistryKey, Object)
      struct RegistryFile_t *file;
-     const REGFI_NK_REC *key;      /* XXX: temporary */
+     const REGFI_NK *key;
 
      struct RegistryKey_t *METHOD(RegistryKey, Con,
-				  struct RegistryFile_t *file, REGFI_NK_REC *base_key);
+				  struct RegistryFile_t *file, REGFI_NK *base_key);
 
      struct SubkeyIterator_t *METHOD(RegistryKey, subkeys);
@@ -104,5 +107,5 @@
      
      SubkeyIterator METHOD(SubkeyIterator, Con, 
-			   struct RegistryFile_t *file, REGFI_NK_REC *key);
+			   struct RegistryFile_t *file, REGFI_NK *key);
 
      void METHOD(SubkeyIterator, __iter__);
@@ -119,8 +122,8 @@
      
      ValueIterator METHOD(ValueIterator, Con, 
-			  struct RegistryFile_t *file, REGFI_NK_REC *key);
+			  struct RegistryFile_t *file, REGFI_NK *key);
 
      void METHOD(ValueIterator, __iter__);
-     REGFI_VK_REC *METHOD(ValueIterator, iternext);
+     REGFI_VK *METHOD(ValueIterator, iternext);
 END_CLASS
 
Index: trunk/python2/regfi/regfi.c
===================================================================
--- trunk/python2/regfi/regfi.c	(revision 202)
+++ trunk/python2/regfi/regfi.c	(revision 203)
@@ -82,5 +82,5 @@
 
 static RegistryKey RegistryKey_Con(RegistryKey self, 
-				   RegistryFile file, REGFI_NK_REC* base_key)
+				   RegistryFile file, REGFI_NK* base_key)
 {
   if(base_key == NULL)
@@ -191,5 +191,4 @@
 }
 
-
 static int TreeIterator_down(TreeIterator self) 
 {
@@ -205,10 +204,15 @@
 }
 
-/*
-static ValueIterator TreeIterator_list_values(TreeIterator self) 
-{
-  return CONSTRUCT(ValueIterator, ValueIterator, Con, NULL, self);
-}
-*/
+static RegistryKey TreeIterator_current(TreeIterator self)
+{
+  return CONSTRUCT(RegistryKey, RegistryKey, Con, NULL, self->file,
+		   regfi_iterator_cur_key(self->iter));
+}
+
+static int TreeIterator_to_root(TreeIterator self)
+{
+  return regfi_iterator_to_root(self->iter);
+}
+
 
 VIRTUAL(TreeIterator, Object) {
@@ -217,4 +221,6 @@
   VMETHOD(down) = TreeIterator_down;
   VMETHOD(up) = TreeIterator_up;
+  VMETHOD(current) = TreeIterator_current;
+  VMETHOD(to_root) = TreeIterator_to_root;
   VMETHOD(__iter__) = TreeIterator__iter__;
   /*  VMETHOD(list_values) = TreeIterator_list_values;*/
@@ -234,5 +240,5 @@
 static SubkeyIterator SubkeyIterator_Con(SubkeyIterator self, 
 					 struct RegistryFile_t* file, 
-					 REGFI_NK_REC* key)
+					 REGFI_NK* key)
 {
   /* XXX: add a talloc reference? */
@@ -256,7 +262,7 @@
 static RegistryKey SubkeyIterator_iternext(SubkeyIterator self)
 {
-  const REGFI_NK_REC* nk;
-
-  if(self->cur < self->list->num_keys)
+  const REGFI_NK* nk;
+
+  if(self->list != NULL && self->cur < self->list->num_keys)
   {
     /* XXX: can we switch to UTF-8 and have Python properly import that? */
@@ -291,5 +297,5 @@
 static ValueIterator ValueIterator_Con(ValueIterator self,
 				       struct RegistryFile_t* file, 
-				       REGFI_NK_REC* key)
+				       REGFI_NK* key)
 {
   /* XXX: add a talloc reference? */
@@ -312,7 +318,7 @@
 }
 
-static REGFI_VK_REC* ValueIterator_iternext(ValueIterator self)
-{
-  const REGFI_VK_REC* vk;
+static REGFI_VK* ValueIterator_iternext(ValueIterator self)
+{
+  const REGFI_VK* vk;
 
   if(self->list != NULL && self->cur < self->list->num_values)
@@ -386,5 +392,5 @@
 }
 
-static RawData RawData_Con(RawData self, REGFI_DATA *data, REGFI_VK_REC *record)
+static RawData RawData_Con(RawData self, REGFI_DATA *data, REGFI_VK *record)
 {
   self->rec = record;
Index: trunk/src/common.c
===================================================================
--- trunk/src/common.c	(revision 202)
+++ trunk/src/common.c	(revision 203)
@@ -320,5 +320,5 @@
 
 
-static char* get_quoted_keyname(const REGFI_NK_REC* nk)
+static char* get_quoted_keyname(const REGFI_NK* nk)
 {
   char* ret_val;
@@ -333,5 +333,5 @@
 
 
-static char* get_quoted_valuename(const REGFI_VK_REC* vk)
+static char* get_quoted_valuename(const REGFI_VK* vk)
 {
   char* ret_val;
Index: trunk/src/reglookup-recover.c
===================================================================
--- trunk/src/reglookup-recover.c	(revision 202)
+++ trunk/src/reglookup-recover.c	(revision 203)
@@ -67,5 +67,5 @@
 
 /* XXX: Somewhere in here, need to start looking for and handling classnames */
-void printKey(REGFI_FILE* f, REGFI_NK_REC* nk, const char* prefix)
+void printKey(REGFI_FILE* f, REGFI_NK* nk, const char* prefix)
 {
   char mtime[24];
@@ -103,5 +103,5 @@
 
 
-void printValue(REGFI_FILE* f, REGFI_VK_REC* vk, const char* prefix)
+void printValue(REGFI_FILE* f, REGFI_VK* vk, const char* prefix)
 {
   char* quoted_value = NULL;
@@ -181,5 +181,5 @@
 
 
-void printSK(REGFI_FILE* f, REGFI_SK_REC* sk)
+void printSK(REGFI_FILE* f, REGFI_SK* sk)
 {
   char* quoted_raw = NULL;
@@ -246,8 +246,8 @@
  *      repeatedly.  Should try to add caching.
  */
-char* getParentPath(REGFI_FILE* f, REGFI_NK_REC* nk)
+char* getParentPath(REGFI_FILE* f, REGFI_NK* nk)
 {
   void_stack* path_stack = void_stack_new(REGFI_MAX_DEPTH);
-  REGFI_NK_REC* cur_ancestor;
+  REGFI_NK* cur_ancestor;
   char* ret_val;
   uint32_t virt_offset, i, stack_size, ret_val_size, ret_val_used, offset;
@@ -410,5 +410,5 @@
 {
   const range_list_element* cur_elem;
-  REGFI_VK_REC* vk;
+  REGFI_VK* vk;
   uint32_t i, j;
 
@@ -453,5 +453,5 @@
 {
   const range_list_element* cur_elem;
-  REGFI_VK_REC* vk;
+  REGFI_VK* vk;
   range_list* bd_cells;
   REGFI_BUFFER data;
@@ -469,5 +469,5 @@
   {
     cur_elem = range_list_get(unalloc_values, i);
-    vk = (REGFI_VK_REC*)cur_elem->data;
+    vk = (REGFI_VK*)cur_elem->data;
     if(vk == NULL)
       return 11;
@@ -588,5 +588,5 @@
 {
   const range_list_element* cur_elem;
-  REGFI_NK_REC* key;
+  REGFI_NK* key;
   uint32_t i, j;
   int error_code = 0;
@@ -640,6 +640,6 @@
 		      range_list* unalloc_linked_values)
 {
-  REGFI_NK_REC* nk;
-  REGFI_VK_REC* vk;
+  REGFI_NK* nk;
+  REGFI_VK* vk;
   const range_list_element* cur_elem;
   uint32_t i, j, num_keys, off, values_length;
@@ -732,5 +732,5 @@
 {
   const range_list_element* cur_elem;
-  REGFI_SK_REC* sk;
+  REGFI_SK* sk;
   uint32_t i, j;
 
@@ -782,6 +782,6 @@
   char* tmp_name;
   char* tmp_path;
-  REGFI_NK_REC* tmp_key;
-  REGFI_VK_REC* tmp_value;
+  REGFI_NK* tmp_key;
+  REGFI_VK* tmp_value;
   uint32_t argi, arge, i, j, ret, num_unalloc_keys;
   int fd;
@@ -922,5 +922,5 @@
   {
     cur_elem = range_list_get(unalloc_keys, i);
-    tmp_key = (REGFI_NK_REC*)cur_elem->data;
+    tmp_key = (REGFI_NK*)cur_elem->data;
 
     if(tmp_key == NULL)
@@ -936,5 +936,5 @@
   {
     cur_elem = range_list_get(unalloc_keys, i);
-    tmp_key = (REGFI_NK_REC*)cur_elem->data;
+    tmp_key = (REGFI_NK*)cur_elem->data;
 
     printKey(f, tmp_key, parent_paths[i]);
@@ -956,7 +956,7 @@
       {
 	tmp_value = 
-	  (REGFI_VK_REC*)range_list_find_data(unalloc_linked_values, 
-					      tmp_key->values->elements[j]
-					      + REGFI_REGF_SIZE);
+	  (REGFI_VK*)range_list_find_data(unalloc_linked_values, 
+					  tmp_key->values->elements[j]
+					  + REGFI_REGF_SIZE);
 	if(tmp_value != NULL)
 	  printValue(f, tmp_value, tmp_path);
@@ -973,5 +973,5 @@
   {
     cur_elem = range_list_get(unalloc_values, i);
-    tmp_value = (REGFI_VK_REC*)cur_elem->data; 
+    tmp_value = (REGFI_VK*)cur_elem->data; 
 
     printValue(f, tmp_value, "");
Index: trunk/src/reglookup.c
===================================================================
--- trunk/src/reglookup.c	(revision 202)
+++ trunk/src/reglookup.c	(revision 203)
@@ -52,5 +52,5 @@
 
 
-void printValue(REGFI_ITERATOR* iter, const REGFI_VK_REC* vk, char* prefix)
+void printValue(REGFI_ITERATOR* iter, const REGFI_VK* vk, char* prefix)
 {
   const REGFI_DATA* data;
@@ -205,5 +205,5 @@
 {
   const REGFI_ITER_POSITION* cur;
-  const REGFI_NK_REC* tmp_key;
+  const REGFI_NK* tmp_key;
   uint32_t buf_left = 127;
   uint32_t buf_len = buf_left+1;
@@ -275,5 +275,5 @@
 void printValueList(REGFI_ITERATOR* iter, char* prefix)
 {
-  const REGFI_VK_REC* value;
+  const REGFI_VK* value;
 
   regfi_iterator_first_value(iter);
@@ -298,6 +298,6 @@
   char mtime[24];
   char* quoted_classname;
-  const REGFI_SK_REC* sk;
-  const REGFI_NK_REC* key = regfi_iterator_cur_key(iter);
+  const REGFI_SK* sk;
+  const REGFI_NK* key = regfi_iterator_cur_key(iter);
   const REGFI_CLASSNAME* classname;
 
@@ -371,7 +371,7 @@
 void printKeyTree(REGFI_ITERATOR* iter)
 {
-  const REGFI_NK_REC* root = NULL;
-  const REGFI_NK_REC* cur = NULL;
-  const REGFI_NK_REC* sub = NULL;
+  const REGFI_NK* root = NULL;
+  const REGFI_NK* cur = NULL;
+  const REGFI_NK* sub = NULL;
   char* path = NULL;
   int key_type = regfi_type_str2val("KEY");
@@ -460,5 +460,5 @@
 int retrievePath(REGFI_ITERATOR* iter, char** path)
 {
-  const REGFI_VK_REC* value;
+  const REGFI_VK* value;
   char* tmp_path_joined;
   const char** tmp_path;
