Index: trunk/src/fmod/fmod_audio.cc
===================================================================
--- trunk/src/fmod/fmod_audio.cc	(revision 391)
+++ trunk/src/fmod/fmod_audio.cc	(revision 392)
@@ -88,9 +88,9 @@
 
 
-nv::sound fmod::audio::load_sound( const std::string& a_path )
+nv::sound fmod::audio::load_sound( const string_ref& a_path )
 {
 	FMOD_SYSTEM* system = (FMOD_SYSTEM*)m_system;
 	FMOD_SOUND* sample;
-	FMOD_RESULT fm_result = FMOD_System_CreateSound( system, a_path.c_str(), FMOD_3D, 0, &sample );
+	FMOD_RESULT fm_result = FMOD_System_CreateSound( system, a_path.data(), FMOD_3D, 0, &sample );
 	if ( fm_result != FMOD_OK )
 	{
Index: trunk/src/formats/assimp_loader.cc
===================================================================
--- trunk/src/formats/assimp_loader.cc	(revision 391)
+++ trunk/src/formats/assimp_loader.cc	(revision 392)
@@ -6,6 +6,5 @@
 
 #include "nv/formats/assimp_loader.hh"
-#include <unordered_map>
-#include "nv/io/std_stream.hh"
+#include "nv/stl/unordered_map.hh"
 #include "nv/gfx/mesh_creator.hh"
 #include "nv/lib/assimp.hh"
@@ -286,5 +285,5 @@
 	const aiScene* scene = (const aiScene*)m_scene;
 	vector< mesh_node_data > final_bones;
-	std::unordered_map< std::string, uint16 > names;
+	unordered_map< std::string, uint16 > names;
 	for ( unsigned int m = 0; m < m_mesh_count; ++m )
 	{
@@ -334,5 +333,5 @@
 	}
 	mesh_node_data* bones = new mesh_node_data[ final_bones.size() ];
-	nv::raw_copy( final_bones.begin(), final_bones.end(), bones );
+	raw_copy( final_bones.begin(), final_bones.end(), bones );
 	return new mesh_nodes_data( "bones", final_bones.size(), bones );
 }
Index: trunk/src/formats/md5_loader.cc
===================================================================
--- trunk/src/formats/md5_loader.cc	(revision 391)
+++ trunk/src/formats/md5_loader.cc	(revision 392)
@@ -6,4 +6,5 @@
 
 #include "nv/core/logging.hh"
+#include "nv/stl/vector.hh"
 #include "nv/io/std_stream.hh"
 
Index: trunk/src/gfx/skeletal_mesh.cc
===================================================================
--- trunk/src/gfx/skeletal_mesh.cc	(revision 391)
+++ trunk/src/gfx/skeletal_mesh.cc	(revision 392)
@@ -7,4 +7,5 @@
 #include "nv/interface/context.hh"
 #include "nv/interface/device.hh"
+#include "nv/stl/unordered_map.hh"
 
 nv::skeletal_mesh_cpu::skeletal_mesh_cpu( context* a_context, const mesh_data* a_mesh_data, const mesh_nodes_data* bones )
@@ -89,5 +90,5 @@
 	if ( !m_node_data->is_flat() )
 	{
-		m_children = new std::vector< uint32 >[ node_count ];
+		m_children = new vector< uint32 >[ node_count ];
 		for ( uint32 n = 0; n < node_count; ++n )
 		{
@@ -132,5 +133,5 @@
 {
 	if ( m_prepared ) return;
-	std::unordered_map< std::string, nv::uint16 > bone_names;
+	unordered_map< std::string, nv::uint16 > bone_names;
 	m_offsets = new mat4[ bones->get_count() ];
 	for ( nv::uint16 bi = 0; bi < bones->get_count(); ++bi )
Index: trunk/src/gl/gl_context.cc
===================================================================
--- trunk/src/gl/gl_context.cc	(revision 391)
+++ trunk/src/gl/gl_context.cc	(revision 392)
@@ -713,5 +713,5 @@
 	if ( info )
 	{
-		for ( auto u : info->m_engine_uniforms )
+		for ( auto& u : *info->m_engine_uniforms )
 		{
 			u->set( this, &s );
Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 391)
+++ trunk/src/gl/gl_device.cc	(revision 392)
@@ -17,7 +17,7 @@
 	m_shader_header  = "#version 120\n";
 	for ( auto& i : get_uniform_factory() ) 
-		m_shader_header += "uniform "+datatype_to_glsl_type( i.second->get_datatype() )+" "+i.first+";\n";
+		m_shader_header += "uniform "+datatype_to_glsl_type( i.second->get_datatype() )+" "+ i.first.to_string() +";\n";
 	for ( auto& i : get_link_uniform_factory() ) 
-		m_shader_header += "uniform sampler2D "+i.first+";\n";
+		m_shader_header += "uniform sampler2D "+i.first.to_string() +";\n";
 }
 
@@ -26,4 +26,8 @@
 	program result = m_programs.create();
 	gl_program_info* info = m_programs.get( result );
+
+	info->m_attribute_map   = new attribute_map;
+	info->m_engine_uniforms = new engine_uniform_list;
+	info->m_uniform_map     = new uniform_map;
 
 	info->glid = glCreateProgram();
@@ -179,5 +183,5 @@
 	if ( info )
 	{
-		for ( auto& i : info->m_uniform_map )
+		for ( auto& i : *info->m_uniform_map )
 			delete i.second;
 
@@ -188,4 +192,8 @@
 		glDeleteProgram( info->glid );
 
+		delete info->m_attribute_map;
+		delete info->m_engine_uniforms;
+		delete info->m_uniform_map;
+
 		m_programs.destroy( p );
 	}
@@ -200,5 +208,5 @@
 		auto& lmap = get_link_uniform_factory();
 
-		for ( auto& i : info->m_uniform_map )
+		for ( auto& i : *info->m_uniform_map )
 		{
 			auto j = lmap.find( i.first );
@@ -211,5 +219,5 @@
 			if ( k != map.end() )
 			{
-				info->m_engine_uniforms.push_back( k->second->create( i.second ) );
+				info->m_engine_uniforms->push_back( k->second->create( i.second ) );
 			}				
 		}
@@ -221,6 +229,6 @@
 	const gl_program_info* info = m_programs.get( p );
 	{
-		nv::uniform_map::const_iterator i = info->m_uniform_map.find( name );
-		if ( i != info->m_uniform_map.end() )
+		nv::uniform_map::const_iterator i = info->m_uniform_map->find( name );
+		if ( i != info->m_uniform_map->end() )
 		{
 			return i->second;
@@ -240,6 +248,6 @@
 	if ( info )
 	{
-		attribute_map::const_iterator i = info->m_attribute_map.find( name );
-		if ( i != info->m_attribute_map.end() )
+		attribute_map::const_iterator i = info->m_attribute_map->find( name );
+		if ( i != info->m_attribute_map->end() )
 		{
 			return i->second.location;
@@ -307,7 +315,7 @@
 void nv::gl_device::update_uniforms( gl_program_info* p )
 {
-	for ( uniform_map::iterator i = p->m_uniform_map.begin(); 	i != p->m_uniform_map.end(); ++i ) 
-	{
-		uniform_base* ubase = i->second;
+	for ( auto& i : *p->m_uniform_map )
+	{
+		uniform_base* ubase = i.second;
 		if ( ubase->is_dirty() )
 		{
@@ -354,5 +362,5 @@
 		int attr_loc = glGetAttribLocation( p->glid, name.c_str() );
 
-		attribute& attr = p->m_attribute_map[ name ];
+		attribute& attr = (*p->m_attribute_map)[ name ];
 		attr.name     = name;
 		attr.location = attr_loc;
@@ -393,5 +401,5 @@
 		uniform_base* u = uniform_base::create( utype, name, uni_loc, uni_len );
 		NV_ASSERT( u, "Unknown uniform type!" );
-		p->m_uniform_map[ name ] = u;
+		(*p->m_uniform_map)[ name ] = u;
 	}
 }
Index: trunk/src/gui/gui_environment.cc
===================================================================
--- trunk/src/gui/gui_environment.cc	(revision 391)
+++ trunk/src/gui/gui_environment.cc	(revision 392)
@@ -14,5 +14,5 @@
 	TODO: parse a lua stylesheet as per Trac wiki
 
-	IDEA: Store everything in std::unordered_maps, with lua_value's?
+	IDEA: Store everything in unordered_maps, with lua_value's?
 
 	A lua_value is a variant stores strings as const char* that deletes them on destructor?
Index: trunk/src/io/string_table.cc
===================================================================
--- trunk/src/io/string_table.cc	(revision 391)
+++ trunk/src/io/string_table.cc	(revision 392)
@@ -6,5 +6,4 @@
 
 #include "nv/io/string_table.hh"
-#include <array>
 
 nv::string_table_creator::string_table_creator()
@@ -24,6 +23,8 @@
 	NV_ASSERT( m_offsets.size() < index(-1), "Too many strings!" );
 	index  result  = (index)m_offsets.size();
-	m_offsets.push_back( m_data.size() );
-	std::copy( cs, cs + cs_size, std::back_inserter( m_data ) );
+	size_t dsize = m_data.size();
+	m_offsets.push_back( dsize );
+	m_data.resize( dsize + cs_size );
+	raw_copy( cs, cs + cs_size, m_data.data() + dsize );
 	m_map[ s ] = result;
 	return result;
@@ -34,6 +35,6 @@
 	offset* offsets = new offset[m_offsets.size()];
 	char*   data    = new char [m_data.size()];
-	std::copy( m_offsets.begin(), m_offsets.end(), offsets );
-	std::copy( m_data.begin(),    m_data.end(),    data );
+	raw_copy( m_offsets.begin(), m_offsets.end(), offsets );
+	raw_copy( m_data.begin(),    m_data.end(),    data );
 	return new string_table( data, m_data.size(), offsets, (index)m_offsets.size() );
 }
Index: trunk/src/sdl/sdl_audio.cc
===================================================================
--- trunk/src/sdl/sdl_audio.cc	(revision 391)
+++ trunk/src/sdl/sdl_audio.cc	(revision 392)
@@ -85,5 +85,5 @@
 }
 
-nv::sound nv::sdl::audio::load_sound( const std::string& a_path )
+nv::sound nv::sdl::audio::load_sound( const string_ref& a_path )
 {
 	// TODO: this is a really weird error - if we remove this check, all hell gets loose
@@ -92,5 +92,5 @@
 		NV_LOG_ERROR( "SDL_mixer not loaded!" );
 	}
-	Mix_Chunk *sample = Mix_LoadWAV_RW(SDL_RWFromFile(a_path.c_str(), "rb"), 1);
+	Mix_Chunk *sample = Mix_LoadWAV_RW(SDL_RWFromFile(a_path.data(), "rb"), 1);
 	if ( sample == nullptr )
 	{
