Index: trunk/src/gui/gui_element.cc
===================================================================
--- trunk/src/gui/gui_element.cc	(revision 265)
+++ trunk/src/gui/gui_element.cc	(revision 266)
@@ -81,4 +81,29 @@
 }
 
+
+bool element::move_to_top( element* child )
+{
+	list::iterator it = std::find( m_children.begin(), m_children.end(), (object*)child );
+	if ( it != m_children.end() )
+	{
+		m_children.erase( it );
+		m_children.push_back( child );
+		return true;
+	}	
+	return false;
+}
+
+bool element::move_to_bottom( element* child )
+{
+	list::iterator it = std::find( m_children.begin(), m_children.end(), (object*)child );
+	if ( it != m_children.end() )
+	{
+		m_children.erase( it );
+		m_children.push_front( child );
+		return true;
+	}	
+	return false;
+}
+
 element::~element()
 {
Index: trunk/src/object.cc
===================================================================
--- trunk/src/object.cc	(revision 265)
+++ trunk/src/object.cc	(revision 266)
@@ -8,7 +8,4 @@
 
 #include <algorithm>
-#include "nv/types.hh"
-#include "nv/lua/lua_state.hh"
-#include "nv/uid.hh"
 
 using namespace nv;
@@ -18,6 +15,4 @@
 	, m_name()
 	, m_uid(0)
-	, m_lua_index(lua::ref::none)
-	, m_lua_proto_index(lua::ref::none)
 	, m_parent( nullptr )
 	, m_children()
@@ -124,27 +119,4 @@
 }
 
-bool object::move_to_top( object* child )
-{
-	list::iterator it = std::find( m_children.begin(), m_children.end(), child );
-	if ( it != m_children.end() )
-	{
-		m_children.erase( it );
-		m_children.push_back( child );
-		return true;
-	}	
-	return false;
-}
-
-bool object::move_to_bottom( object* child )
-{
-	list::iterator it = std::find( m_children.begin(), m_children.end(), child );
-	if ( it != m_children.end() )
-	{
-		m_children.erase( it );
-		m_children.push_front( child );
-		return true;
-	}	
-	return false;
-}
 
 // void object::register_type( type_database* db )
Index: trunk/src/root.cc
===================================================================
--- trunk/src/root.cc	(revision 265)
+++ trunk/src/root.cc	(revision 266)
@@ -10,24 +10,8 @@
 #include "nv/lua/lua_state.hh"
 
-void nv::root::object_created( object* o )
-{
-	if ( m_uid_store )
-	{
-		o->m_uid = m_uid_store->insert( o );
-	}
-}
-
 void nv::root::destroy_object( object* o )
 {
 	destroy_children( o );
 	o->detach();
-	if ( m_lua_state && o->m_lua_index != lua::ref::none )
-	{
-		m_lua_state->unregister_object( lua::ref( o->m_lua_index ) );
-	}
-	if ( m_uid_store && o->m_uid != 0 )
-	{
-		m_uid_store->remove( o->m_uid );
-	}
 	delete o;
 }
@@ -40,19 +24,2 @@
 	}
 }
-
-void nv::root::register_with_lua( object* o, const char* lua_name, const char* storage )
-{
-	if ( m_lua_state )
-	{
-		if ( lua_name != nullptr )
-		{
-			o->m_lua_index       = m_lua_state->register_object( o, lua_name ).get();
-		}
-		if ( storage != nullptr )
-		{
-			o->m_lua_proto_index = m_lua_state->register_proto( o->get_id().c_str(), storage ).get();
-		}
-	}
-
-}
-
Index: trunk/src/uid.cc
===================================================================
--- trunk/src/uid.cc	(revision 265)
+++ trunk/src/uid.cc	(revision 266)
@@ -9,5 +9,5 @@
 using namespace nv;
 
-uid_store::uid_store()
+uid_store_raw::uid_store_raw()
 	: m_map(), m_current(0)
 {
@@ -15,5 +15,5 @@
 }
 
-object* uid_store::get( uid auid ) const
+void* uid_store_raw::get( uid auid ) const
 {
 	map::const_iterator i = m_map.find( auid );
@@ -25,15 +25,15 @@
 }
 
-bool uid_store::remove( uid auid )
+bool uid_store_raw::remove( uid auid )
 {
 	return m_map.erase( auid ) != 0;
 }
 
-void uid_store::insert( object* o, uid auid )
+void uid_store_raw::insert( void* o, uid auid )
 {
 	m_map[ auid ] = o;
 }
 
-uid uid_store::insert( object* o )
+uid uid_store_raw::insert( void* o )
 {
 	uid u = request_uid();
@@ -42,10 +42,10 @@
 }
 
-uid uid_store::request_uid()
+uid uid_store_raw::request_uid()
 {
 	return ++m_current;
 }
 
-uid_store::~uid_store()
+uid_store_raw::~uid_store_raw()
 {
 	// no-op
