Index: /trunk/legacy/any.hh
===================================================================
--- /trunk/legacy/any.hh	(revision 440)
+++ /trunk/legacy/any.hh	(revision 440)
@@ -0,0 +1,158 @@
+// Copyright (C) 2014-2015 ChaosForge Ltd
+// http://chaosforge.org/
+//
+// This file is part of Nova libraries. 
+// For conditions of distribution and use, see copying.txt file in root folder.
+
+/**
+ * @file any.hh
+ * @author Kornel Kisielewicz
+ * @brief any type
+ *
+ * based on http://www.two-sdg.demon.co.uk/curbralan/papers/ValuedConversions.pdf
+ */
+
+#ifndef NV_STL_ANY_HH
+#define NV_STL_ANY_HH
+
+#include <nv/common.hh>
+#include <nv/stl/utility.hh>
+#include <nv/stl/type_traits.hh>
+#include <nv/stl/type_info.hh>
+
+#error "any type is currently unsupported!"
+
+namespace nv
+{
+	
+	class any
+	{
+	public:
+		any() : m_content( nullptr ) {}
+		
+		any( const any& other )
+			: m_content( other.m_content ? other.m_content->clone() : nullptr )
+		{}
+
+		template< typename T >
+		any( const T& value )
+			: m_content( new holder<T>( value ) )
+		{}
+
+		any( any&& other ) 
+			: m_content( other.m_content )
+		{}
+
+		template< typename T >
+		any( T&& value )
+			: m_content( new holder<T>( forward<T>(value) ) )
+		{}
+
+		~any() 
+		{ 
+			delete m_content; 
+		}
+
+		any& swap( any& rhs )
+		{
+			nv::swap( m_content, rhs.m_content );
+			return *this;
+		}
+
+		any& operator=( const any& rhs )
+		{
+			return swap( any( rhs ) );
+		}
+
+		any& operator=( any&& rhs )
+		{
+			swap( rhs );
+			any().swap( rhs );
+			return *this;
+		}
+
+		template < typename T >
+		any& operator= ( T&& rhs )
+		{
+			any( forward<T>(rhs) ).swap(*this);
+			return *this;
+		}
+
+		operator const void* () const
+		{
+			return m_content;
+		}
+
+		template< typename T >
+		bool copy_to( T& value ) const
+		{
+			const T* copyable = to_ptr<T>();
+			if ( copyable ) value = *copyable;
+			return copyable;
+		}
+		template< typename T >
+		const T* to_ptr() const
+		{
+			return type_info() == typeid(T) ? &static_cast< holder<T> *>(m_content)->held				: nullptr;
+		}
+
+		bool empty() const
+		{
+			return !m_content;
+		}
+
+		void clear()
+		{
+			any().swap(*this);
+		}
+
+		const std::type_info &type_info() const
+		{
+			return m_content ? m_content->type_info() : typeid(void);
+		}
+	private:
+		class placeholder
+		{
+		public:
+			virtual const std::type_info& type_info() const = 0;
+			virtual placeholder *clone() const = 0;
+			virtual ~placeholder() {}
+		};
+
+		template< typename T >
+		class holder : public placeholder
+		{
+		public:
+			holder( const T& value ) : held(value)
+			{
+			}
+			holder( T&& value ) : held(forward<T>(value))
+			{
+			}
+			virtual const std::type_info &type_info() const
+			{
+				return typeid(T);
+			}
+			virtual placeholder *clone() const
+			{
+				return new holder(held);
+			}
+			const T held;
+		};
+		placeholder *m_content;
+	};
+
+	inline void swap( any& lhs, any& rhs )
+	{
+		lhs.swap(rhs);
+	}
+
+	template< typename T >
+	T any_cast( const any& operand )
+	{
+		const T* result = operand.to_ptr<T>();
+		return result ? *result : throw std::bad_cast();
+	}
+}
+
+#endif // NV_STL_ANY_HH
Index: /trunk/legacy/exception.hh
===================================================================
--- /trunk/legacy/exception.hh	(revision 440)
+++ /trunk/legacy/exception.hh	(revision 440)
@@ -0,0 +1,46 @@
+// Copyright (C) 2012-2015 ChaosForge Ltd
+// http://chaosforge.org/
+//
+// This file is part of Nova libraries. 
+// For conditions of distribution and use, see copying.txt file in root folder.
+
+/**
+ * @file exception.hh
+ * @author Kornel Kisielewicz epyon@chaosforge.org
+ * @brief nv exception bases
+ */
+
+#ifndef NV_STL_EXCEPTION_HH
+#define NV_STL_EXCEPTION_HH
+
+#include <nv/common.hh>
+#include <string>
+#include <exception>
+#include <stdexcept>
+
+namespace nv
+{
+	/**
+	 * NV logic_error.
+	 *
+	 * Inherits std::logic_error.
+	 */
+	class logic_error : public std::logic_error
+	{
+	public:
+		explicit logic_error( const std::string& msg ) : std::logic_error( msg ) {}
+	};
+
+	/**
+	 * NV runtime_error.
+	 *
+	 * Inherits std::runtime_error.
+	 */
+	class runtime_error : public std::runtime_error
+	{
+	public:
+		explicit runtime_error( const std::string& msg ) : std::runtime_error( msg ) {}
+	};
+}
+
+#endif // NV_STL_EXCEPTION_HH
Index: /trunk/nv/gl/gl_window.hh
===================================================================
--- /trunk/nv/gl/gl_window.hh	(revision 439)
+++ /trunk/nv/gl/gl_window.hh	(revision 440)
@@ -26,10 +26,10 @@
 	public:
 		gl_window( device* dev, window_manager* wm, input* a_input, void* handle, void* dc );
-		virtual void set_title( const std::string& ) {}
+		virtual void set_title( const string_view& ) {}
 		virtual context* get_context()    { return m_context; }
 		virtual device* get_device()      { return m_device; }
 		virtual uint16 get_width() const  { return m_width; }
 		virtual uint16 get_height() const { return m_height; }
-		virtual std::string get_title() const { return std::string(); }
+		virtual string_view get_title() const { return string_view(); }
 		// TODO : implement?
 		virtual void set_swap_control( bool ) {}
Index: /trunk/nv/gui/gui_element.hh
===================================================================
--- /trunk/nv/gui/gui_element.hh	(revision 439)
+++ /trunk/nv/gui/gui_element.hh	(revision 440)
@@ -30,13 +30,13 @@
 		public:
 			/// List type
-			typedef std::list<handle> list;
-
-			std::string    m_id;              ///< id type of the object
+			// TODO: change to small_vector once implemented!
+			typedef vector< handle > child_list;
+			shash64 m_id;              ///< id type of the object
 			handle    m_parent;          ///< pointer to parent
 			flags     m_flags;
-			list      m_children;        ///< children objects
+			child_list m_children;        ///< children objects
 			size_t    m_child_count;     ///< number of children
-			std::string    m_class; ///< Class name.
-			std::string    m_text; ///< Displayed label or text.
+			shash64    m_class; ///< Class name.
+			string_buffer m_text; ///< Displayed label or text.
 			rectangle m_relative; ///< Position relative to parent.
 			rectangle m_absolute; ///< Position relative to window/screen.
Index: /trunk/nv/gui/gui_environment.hh
===================================================================
--- /trunk/nv/gui/gui_environment.hh	(revision 439)
+++ /trunk/nv/gui/gui_environment.hh	(revision 440)
@@ -34,10 +34,11 @@
 			handle create_element( const rectangle& r );
 			handle create_element( handle parent, const rectangle& r );
-			void set_text( handle e, const std::string& text );
-			void set_class( handle  e, const std::string& text );
+			void set_text( handle e, const string_twine& text );
+			void set_class( handle e, const string_view& text );
 			void update();
 			void draw();
 			void destroy_element( handle e );
 			bool process_io_event( const io_event& ev );
+			string_view get_string( shash64 h );
 			virtual ~environment();
 		protected:
@@ -53,5 +54,4 @@
 			handle get_deepest_child( handle e, const position& p );
 			void move_to_top( handle child );
-			void move_to_bottom( handle child );
 			void set_relative( handle e, const rectangle& r );
 			void set_relative( handle e, const position& p );
@@ -59,4 +59,5 @@
 
 			handle_store< element, handle > m_elements;
+			string_table  m_strings;
 			renderer*     m_renderer;
 			handle        m_screen;
Index: /trunk/nv/gui/gui_renderer.hh
===================================================================
--- /trunk/nv/gui/gui_renderer.hh	(revision 439)
+++ /trunk/nv/gui/gui_renderer.hh	(revision 440)
@@ -28,4 +28,5 @@
 		public:
 			renderer() {}
+			virtual void set_environment( environment* env ) { m_style.set_environment( env ); }
 			virtual void load_style( const string_view& filename );
 			virtual void redraw( element* e, uint32 ) = 0;
Index: /trunk/nv/gui/gui_style.hh
===================================================================
--- /trunk/nv/gui/gui_style.hh	(revision 439)
+++ /trunk/nv/gui/gui_style.hh	(revision 440)
@@ -26,15 +26,17 @@
 		{
 		public:
-			style();
+			style() : m_env( nullptr ) {}
+			void set_environment( environment* env ) { m_env = env;  }
 			void load_style( const string_view& filename );
-			bool get( element* e, const char* centry, const char* cselector, std::string& s );
-			bool get( element* e, const char* centry, const char* cselector, vec4& vec );
-			bool get( element* e, const char* centry, const char* cselector, int& i );
-			bool get( element* e, const char* centry, const char* cselector, double& d );
+			bool get( element* e, const string_view& centry, const string_view& cselector, string128& s );
+			bool get( element* e, const string_view& centry, const string_view& cselector, vec4& vec );
+			bool get( element* e, const string_view& centry, const string_view& cselector, int& i );
+			bool get( element* e, const string_view& centry, const string_view& cselector, double& d );
 			~style();
 		protected:
-			bool find_entry( const char* cselector, const char* centry, int type );
-			bool resolve( const char* cid, const char* cclass, const char* cselector, const char* centry, int type );
+			bool find_entry( const string_view& cselector, const string_view& centry, int type );
+			bool resolve( shash64 cid, shash64 cclass, const string_view& cselector, const string_view& centry, int type );
 		protected:
+			environment* m_env;
 			lua::state m_lua; //!< separate lua state for style calculation
 		};
Index: /trunk/nv/interface/image_data.hh
===================================================================
--- /trunk/nv/interface/image_data.hh	(revision 439)
+++ /trunk/nv/interface/image_data.hh	(revision 440)
@@ -16,5 +16,5 @@
 #include <nv/common.hh>
 #include <nv/stl/math.hh>
-#include <algorithm>
+#include <nv/stl/algorithm/raw.hh>
 
 namespace nv
@@ -58,5 +58,5 @@
 			size_t bsize = static_cast<size_t>(m_size.x * m_size.y) * get_depth();
 			m_data = new uint8[ bsize ]; 
-			std::copy( data, data + bsize, m_data );
+			raw_copy( data, data + bsize, m_data );
 		}
 
Index: /trunk/nv/interface/uniform.hh
===================================================================
--- /trunk/nv/interface/uniform.hh	(revision 439)
+++ /trunk/nv/interface/uniform.hh	(revision 440)
@@ -79,5 +79,5 @@
 		{ 
 			// TODO: memcmp?
-			std::copy( value, value + count, m_value );
+			raw_copy( value, value + count, m_value );
 			m_dirty = true;
 		}
Index: /trunk/nv/interface/window.hh
===================================================================
--- /trunk/nv/interface/window.hh	(revision 439)
+++ /trunk/nv/interface/window.hh	(revision 440)
@@ -28,6 +28,6 @@
 		virtual uint16 get_width() const = 0;
 		virtual uint16 get_height() const = 0;
-		virtual std::string get_title() const = 0;
-		virtual void set_title( const std::string& title ) = 0;
+		virtual string_view get_title() const = 0;
+		virtual void set_title( const string_view& title ) = 0;
 		virtual context* get_context() = 0;
 		virtual bool is_event_pending() = 0;
Index: /trunk/nv/lua/lua_function.hh
===================================================================
--- /trunk/nv/lua/lua_function.hh	(revision 439)
+++ /trunk/nv/lua/lua_function.hh	(revision 440)
@@ -54,5 +54,5 @@
 			{
 				retrieve();
-				detail::push_values(L, std::forward<Args>(args)...);
+				detail::push_values(L, forward<Args>(args)...);
 				return call_result<R>(sizeof...(Args));
 			}
Index: /trunk/nv/lua/lua_path.hh
===================================================================
--- /trunk/nv/lua/lua_path.hh	(revision 439)
+++ /trunk/nv/lua/lua_path.hh	(revision 440)
@@ -35,5 +35,5 @@
 			}
 
-			std::string to_string() const;
+			string128 to_string() const;
 			bool resolve( lua_State* L, bool global = true ) const;
 		
Index: /trunk/nv/lua/lua_state.hh
===================================================================
--- /trunk/nv/lua/lua_state.hh	(revision 439)
+++ /trunk/nv/lua/lua_state.hh	(revision 440)
@@ -61,5 +61,5 @@
 				if (push_function(p, m_global))
 				{
-					detail::push_values(m_state, std::forward<Args>(args)...);
+					detail::push_values(m_state, forward<Args>(args)...);
 					if (call_function(sizeof...(Args), detail::return_count< R >::value) == 0)
 					{
@@ -268,5 +268,5 @@
 				if ( push_function( p, false ) )
 				{
-					detail::push_values( m_state, std::forward<Args>(args)... );
+					detail::push_values( m_state, forward<Args>(args)... );
 					if (call_function(sizeof...(Args), detail::return_count< R >::value) == 0)
 					{
@@ -297,6 +297,6 @@
 			shash64 get_string_hash_64( string_view element, uint64 defval = 0 );
 			shash64 get_string( string_view element, string_table& table, uint64 defval = 0 );
-			std::string get_std_string( string_view element, string_view defval = string_view() );
 			const_string get_string( string_view element, string_view defval = string_view() );
+			string128 get_string128( string_view element, string_view defval = string_view() );
 			char get_char( string_view element, char defval = ' ' );
 			int get_integer( string_view element, int defval = 0 );
Index: /trunk/nv/lua/lua_values.hh
===================================================================
--- /trunk/nv/lua/lua_values.hh	(revision 439)
+++ /trunk/nv/lua/lua_values.hh	(revision 440)
@@ -73,5 +73,4 @@
 			void push_number     ( lua_State *L, lnumber v );
 			void push_bool       ( lua_State *L, bool v );
-			void push_string     ( lua_State *L, const std::string& s );
 			void push_string_view( lua_State *L, string_view s );
 			void push_cstring    ( lua_State *L, const char* s );
@@ -83,5 +82,4 @@
 			lnumber     to_number     ( lua_State *L, int index );
 			bool        to_bool       ( lua_State *L, int index );
-			std::string to_string     ( lua_State *L, int index );
 			const char* to_cstring    ( lua_State *L, int index );
 			string_view to_string_view( lua_State *L, int index );
@@ -93,5 +91,4 @@
 			lnumber     to_number     ( lua_State *L, int index, lnumber def );
 			bool        to_bool       ( lua_State *L, int index, bool def );
-			std::string to_string     ( lua_State *L, int index, const std::string& def );
 			const char* to_cstring    ( lua_State *L, int index, const char* def );
 			string_view to_string_view( lua_State *L, int index, string_view def );
@@ -151,12 +148,4 @@
 
 		template <>
-		struct pass_traits<std::string>
-		{
-			static void push( lua_State *L, const std::string& s ) { detail::push_string( L, s ); }
-			static std::string to( lua_State *L, int index ) { return detail::to_string( L, index ); }
-			static std::string to( lua_State *L, int index, const std::string& def ) { return detail::to_string( L, index, def ); }
-		};
-
-		template <>
 		struct pass_traits < string_view >
 		{
@@ -171,5 +160,13 @@
 			static void push( lua_State *L, const const_string& s ) { detail::push_string_view( L, s ); }
 			static const_string to( lua_State *L, int index ) { return const_string( detail::to_string_view( L, index ) ); }
-			static const_string to( lua_State *L, int index, const_string def ) { return const_string( detail::to_string_view( L, index, def ) ); }
+			static const_string to( lua_State *L, int index, const string_view& def ) { return const_string( detail::to_string_view( L, index, def ) ); }
+		};
+
+		template <>
+		struct pass_traits < string128 >
+		{
+			static void push( lua_State *L, const string128& s ) { detail::push_string_view( L, s ); }
+			static string128 to( lua_State *L, int index ) { return string128( detail::to_string_view( L, index ) ); }
+			static string128 to( lua_State *L, int index, const string_view& def ) { return string128( detail::to_string_view( L, index, def ) ); }
 		};
 
@@ -211,10 +208,4 @@
 			{
 				typedef const char* type;
-			};
-
-			template <typename T>
-			struct type_degrade< T, enable_if_t< is_same< std::string, remove_cvr_t< T > >::value > >
-			{
-				typedef std::string type;
 			};
 
Index: /trunk/nv/sdl/sdl_window.hh
===================================================================
--- /trunk/nv/sdl/sdl_window.hh	(revision 439)
+++ /trunk/nv/sdl/sdl_window.hh	(revision 440)
@@ -27,5 +27,5 @@
 		public:
 			window( device* dev, uint16 width, uint16 height, bool fullscreen = false );
-			virtual void set_title( const std::string& title );
+			virtual void set_title( const string_view& title );
 			virtual void swap_buffers();
 
@@ -34,5 +34,5 @@
 			virtual uint16 get_width() const  { return m_width; }
 			virtual uint16 get_height() const { return m_height; }
-			virtual std::string get_title() const { return m_title; }
+			virtual string_view get_title() const { return m_title; }
 			virtual void set_swap_control( bool enabled );
 			virtual bool is_event_pending()            { return m_input->is_event_pending(); }
@@ -45,5 +45,5 @@
 			uint16      m_width;
 			uint16      m_height;
-			std::string      m_title;
+			string128   m_title;
 			void*       m_handle;
 			gl_context* m_context;
Index: unk/nv/stl/any.hh
===================================================================
--- /trunk/nv/stl/any.hh	(revision 439)
+++ 	(revision )
@@ -1,158 +1,0 @@
-// Copyright (C) 2014-2015 ChaosForge Ltd
-// http://chaosforge.org/
-//
-// This file is part of Nova libraries. 
-// For conditions of distribution and use, see copying.txt file in root folder.
-
-/**
- * @file any.hh
- * @author Kornel Kisielewicz
- * @brief any type
- *
- * based on http://www.two-sdg.demon.co.uk/curbralan/papers/ValuedConversions.pdf
- */
-
-#ifndef NV_STL_ANY_HH
-#define NV_STL_ANY_HH
-
-#include <nv/common.hh>
-#include <nv/stl/utility.hh>
-#include <nv/stl/type_traits.hh>
-#include <nv/stl/type_info.hh>
-
-#error "any type is currently unsupported!"
-
-namespace nv
-{
-	
-	class any
-	{
-	public:
-		any() : m_content( nullptr ) {}
-		
-		any( const any& other )
-			: m_content( other.m_content ? other.m_content->clone() : nullptr )
-		{}
-
-		template< typename T >
-		any( const T& value )
-			: m_content( new holder<T>( value ) )
-		{}
-
-		any( any&& other ) 
-			: m_content( other.m_content )
-		{}
-
-		template< typename T >
-		any( T&& value )
-			: m_content( new holder<T>( forward<T>(value) ) )
-		{}
-
-		~any() 
-		{ 
-			delete m_content; 
-		}
-
-		any& swap( any& rhs )
-		{
-			nv::swap( m_content, rhs.m_content );
-			return *this;
-		}
-
-		any& operator=( const any& rhs )
-		{
-			return swap( any( rhs ) );
-		}
-
-		any& operator=( any&& rhs )
-		{
-			swap( rhs );
-			any().swap( rhs );
-			return *this;
-		}
-
-		template < typename T >
-		any& operator= ( T&& rhs )
-		{
-			any( forward<T>(rhs) ).swap(*this);
-			return *this;
-		}
-
-		operator const void* () const
-		{
-			return m_content;
-		}
-
-		template< typename T >
-		bool copy_to( T& value ) const
-		{
-			const T* copyable = to_ptr<T>();
-			if ( copyable ) value = *copyable;
-			return copyable;
-		}
-		template< typename T >
-		const T* to_ptr() const
-		{
-			return type_info() == typeid(T) ? &static_cast< holder<T> *>(m_content)->held				: nullptr;
-		}
-
-		bool empty() const
-		{
-			return !m_content;
-		}
-
-		void clear()
-		{
-			any().swap(*this);
-		}
-
-		const std::type_info &type_info() const
-		{
-			return m_content ? m_content->type_info() : typeid(void);
-		}
-	private:
-		class placeholder
-		{
-		public:
-			virtual const std::type_info& type_info() const = 0;
-			virtual placeholder *clone() const = 0;
-			virtual ~placeholder() {}
-		};
-
-		template< typename T >
-		class holder : public placeholder
-		{
-		public:
-			holder( const T& value ) : held(value)
-			{
-			}
-			holder( T&& value ) : held(forward<T>(value))
-			{
-			}
-			virtual const std::type_info &type_info() const
-			{
-				return typeid(T);
-			}
-			virtual placeholder *clone() const
-			{
-				return new holder(held);
-			}
-			const T held;
-		};
-		placeholder *m_content;
-	};
-
-	inline void swap( any& lhs, any& rhs )
-	{
-		lhs.swap(rhs);
-	}
-
-	template< typename T >
-	T any_cast( const any& operand )
-	{
-		const T* result = operand.to_ptr<T>();
-		return result ? *result : throw std::bad_cast();
-	}
-}
-
-#endif // NV_STL_ANY_HH
Index: unk/nv/stl/exception.hh
===================================================================
--- /trunk/nv/stl/exception.hh	(revision 439)
+++ 	(revision )
@@ -1,46 +1,0 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
-// http://chaosforge.org/
-//
-// This file is part of Nova libraries. 
-// For conditions of distribution and use, see copying.txt file in root folder.
-
-/**
- * @file exception.hh
- * @author Kornel Kisielewicz epyon@chaosforge.org
- * @brief nv exception bases
- */
-
-#ifndef NV_STL_EXCEPTION_HH
-#define NV_STL_EXCEPTION_HH
-
-#include <nv/common.hh>
-#include <string>
-#include <exception>
-#include <stdexcept>
-
-namespace nv
-{
-	/**
-	 * NV logic_error.
-	 *
-	 * Inherits std::logic_error.
-	 */
-	class logic_error : public std::logic_error
-	{
-	public:
-		explicit logic_error( const std::string& msg ) : std::logic_error( msg ) {}
-	};
-
-	/**
-	 * NV runtime_error.
-	 *
-	 * Inherits std::runtime_error.
-	 */
-	class runtime_error : public std::runtime_error
-	{
-	public:
-		explicit runtime_error( const std::string& msg ) : std::runtime_error( msg ) {}
-	};
-}
-
-#endif // NV_STL_EXCEPTION_HH
Index: /trunk/nv/stl/handle.hh
===================================================================
--- /trunk/nv/stl/handle.hh	(revision 439)
+++ /trunk/nv/stl/handle.hh	(revision 440)
@@ -43,5 +43,5 @@
 		bool is_valid() const { return !is_nil(); }
 		T index() const { return m_index; }
-		//size_t hash() const { return std::hash<T>()( T( m_counter << IBITS | m_index ) ); }
+		//size_t hash() const { return hash<T>()( T( m_counter << IBITS | m_index ) ); }
 		size_t hash() const { NV_ASSERT( false, "UNIMPLEMENTED!" ); return 0; }
 	protected:
@@ -200,7 +200,7 @@
 			if ( dead_eindex != static_cast<index_type>( m_data.size()-1 ) )
 			{
-				m_data[ unsigned( dead_eindex ) ]    = m_data.back();
+				m_data[ unsigned( dead_eindex ) ]   = move( m_data.back() );
 				m_handles[unsigned( dead_eindex ) ] = swap_handle;
-				m_indexes[ swap_handle.index() ]       = dead_eindex;
+				m_indexes[ swap_handle.index() ]    = dead_eindex;
 			}
 			m_data.pop_back();
Index: /trunk/nv/stl/string.hh
===================================================================
--- /trunk/nv/stl/string.hh	(revision 439)
+++ /trunk/nv/stl/string.hh	(revision 440)
@@ -28,5 +28,4 @@
 #include <nv/stl/string/const_string.hh>
 #include <nv/stl/string/short_string.hh>
-#include <string>
 #include <nv/stl/type_traits/primary.hh>
 #include <nv/stl/memory.hh>
@@ -37,14 +36,4 @@
 {
 	
-	template< typename H >
-	struct hash< std::string, H > : detail::hash_base< std::string, H >
-	{
-		static H get( const std::string& value )
-		{
-			return hash_string< H >( value.c_str(), value.length() );
-		}
-		inline H operator()( const std::string& value ) const { return get( value ); }
-	};
-
 	namespace detail
 	{
@@ -58,5 +47,4 @@
 				is_same< const char *, decayed_type >::value > type;
 		};
-
 
 	}
Index: /trunk/nv/stl/string/short_string.hh
===================================================================
--- /trunk/nv/stl/string/short_string.hh	(revision 439)
+++ /trunk/nv/stl/string/short_string.hh	(revision 440)
@@ -33,5 +33,4 @@
 		}
 
-
 		template < typename Base >
 		inline explicit string_buffer_base( const string_base< Base >& s ) : this_type( s.data(), s.size() ) {}
@@ -44,4 +43,17 @@
 		inline string_buffer_base( string_buffer_base&& copy ) = default;
 		inline string_buffer_base& operator=( string_buffer_base&& other ) = default;
+
+		void assign( const char* data, size_t sz )
+		{
+			clear();
+			append( data, sz );
+		}
+
+		template < typename T >
+		void assign( const T& value )
+		{
+			clear();
+			append( value );
+		}
 
 		size_t append( const char* data, size_t sz )
Index: /trunk/nv/stl/string/string_twine.hh
===================================================================
--- /trunk/nv/stl/string/string_twine.hh	(revision 440)
+++ /trunk/nv/stl/string/string_twine.hh	(revision 440)
@@ -0,0 +1,232 @@
+// Copyright (C) 2015-2015 ChaosForge Ltd
+// http://chaosforge.org/
+//
+// This file is part of Nova libraries. 
+// For conditions of distribution and use, see copying.txt file in root folder.
+
+#ifndef NV_STL_STRING_STRING_TWINE_HH
+#define NV_STL_STRING_STRING_TWINE_HH
+
+#include <nv/stl/string/common.hh>
+#include <nv/stl/string/string_base.hh>
+
+namespace nv
+{
+
+	class string_twine
+	{
+	private:
+		enum twine_type : uint8
+		{
+			EMPTY,
+			TWINE,
+			STRING,
+			CSTRING,
+			BUFFER,
+		};
+	public:
+
+		string_twine() {}
+
+		string_twine( uint32 u )
+		{
+			m_lhs.type = BUFFER;
+			m_lhs.value.buffer.size = static_cast< uint8 >( uint32_to_buffer( array_ref<char>( m_lhs.value.buffer.data ), u ) );
+		}
+
+		string_twine( sint32 s )
+		{
+			m_lhs.type = BUFFER;
+			m_lhs.value.buffer.size = static_cast< uint8 >( sint32_to_buffer( array_ref<char>( m_lhs.value.buffer.data ), s ) );
+		}
+
+		string_twine( uint64 u )
+		{
+			m_lhs.type = BUFFER;
+			m_lhs.value.buffer.size = static_cast< uint8 >( uint64_to_buffer( array_ref<char>( m_lhs.value.buffer.data ), u ) );
+		}
+
+		string_twine( sint64 s )
+		{
+			m_lhs.type = BUFFER;
+			m_lhs.value.buffer.size = static_cast< uint8 >( sint64_to_buffer( array_ref<char>( m_lhs.value.buffer.data ), s ) );
+		}
+
+		string_twine( f32 f )
+		{
+			m_lhs.type = BUFFER;
+			m_lhs.value.buffer.size = static_cast< uint8 >( f64_to_buffer( array_ref<char>( m_lhs.value.buffer.data ), f ) );
+		}
+
+		string_twine( f64 f )
+		{
+			m_lhs.type = BUFFER;
+			m_lhs.value.buffer.size = static_cast< uint8 >( f64_to_buffer( array_ref<char>( m_lhs.value.buffer.data ), f ) );
+		}
+
+		template < typename Base >
+		string_twine( const string_base< Base >& s )
+		{
+			m_lhs.type = CSTRING;
+			m_lhs.value.cstring.size = s.size();
+			m_lhs.value.cstring.data = s.data();
+		}
+
+		string_twine( const string_twine& s ) = default;
+
+		string_twine( const char* data, size_t sz )
+			: m_lhs( data, sz ), m_rhs()
+		{
+		}
+
+		bool empty() const
+		{
+			return m_lhs.type == EMPTY;
+		}
+
+		bool is_unary() const
+		{
+			return m_lhs.type != EMPTY && m_rhs.type == EMPTY;
+		}
+
+		bool is_binary() const
+		{
+			return m_lhs.type != EMPTY && m_rhs.type != EMPTY;
+		}
+
+		string_twine concat( const string_twine& other ) const
+		{
+			if ( empty() ) return other;
+			if ( other.empty() ) return *this;
+			return string_twine( *this, other );
+		}
+
+		size_t dump_size() const
+		{
+			return dump_size( m_lhs ) + dump_size( m_rhs );
+		}
+
+		void dump( array_ref< char > target ) const
+		{
+			dump_recursive( target );
+		}
+	private:
+		struct twine_cstring
+		{
+			size_t      size;
+			const char* data;
+		};
+
+		struct twine_buffer
+		{
+			uint8 size;
+			char  data[15];
+		};
+
+		union twine_value
+		{
+			const string_twine* twine;
+			const string_view*  string;
+			twine_cstring       cstring;
+			twine_buffer        buffer;
+		};
+
+		struct twine_node
+		{
+			twine_type type;
+			twine_value value;
+
+			twine_node() : type( EMPTY ) {}
+			twine_node( twine_type t ) : type( t ) {}
+			twine_node( const string_twine* v ) : type( TWINE ) { value.twine = v; }
+			twine_node( const string_view* v ) : type( STRING ) { value.string = v; }
+			twine_node( const char* d, size_t s ) : type( CSTRING ) { value.cstring.data = d; value.cstring.size = s; }
+		};
+
+		twine_node m_lhs;
+		twine_node m_rhs;
+
+	private:
+		string_twine &operator=( const string_twine& ) = delete;
+
+		explicit string_twine( const string_twine& lhs, const string_twine& rhs )
+		{
+			if ( lhs.empty() )
+			{
+				m_lhs = rhs.m_lhs;
+				m_rhs = rhs.m_rhs;
+				return;
+			}
+			if ( rhs.empty() )
+			{
+				m_lhs = lhs.m_lhs;
+				m_rhs = lhs.m_rhs;
+				return;
+			}
+			m_lhs = lhs.is_unary() ? lhs.m_lhs : twine_node( &lhs );
+			m_rhs = rhs.is_unary() ? rhs.m_lhs : twine_node( &rhs );
+		}
+
+		size_t dump_size( const twine_node& node ) const
+		{
+			switch ( node.type )
+			{
+			case TWINE      : return node.value.twine->dump_size(); 
+			case STRING     : return node.value.string->size(); 
+			case CSTRING    : return node.value.cstring.size;
+			case BUFFER     : return node.value.buffer.size;
+			default : break;
+			}
+			return 0;
+		}
+
+		void dump_recursive( array_ref< char >& target ) const
+		{
+			dump_node( target, m_lhs );
+			dump_node( target, m_rhs );
+		}
+
+		void dump_node( array_ref< char >& target, const twine_node& node ) const
+		{
+			switch ( node.type )
+			{
+			case TWINE   : node.value.twine->dump_recursive( target ); return;
+			case STRING  : dump_string( target, *node.value.string ); return;
+			case CSTRING : dump_string( target, string_view( node.value.cstring.data, node.value.cstring.size ) ); return;
+			case BUFFER  : dump_string( target, string_view( node.value.buffer.data, node.value.buffer.size ) ); return;
+			default: return;
+			}
+		}
+
+		void dump_string( array_ref< char >& target, const string_view& string ) const
+		{
+			size_t dump_length = nv::min( target.size(), string.size() );
+			if ( dump_length > 0 )
+			{
+				raw_copy_n( string.data(), dump_length, target.data() );
+				target.assign( target.data() + dump_length, target.size() - dump_length );
+			}
+		}
+
+	};
+
+	inline string_twine operator+( const string_twine& lhs, const string_twine& rhs )
+	{
+		return lhs.concat( rhs );
+	}
+
+	template < size_t N >
+	inline string_twine operator+( const char (&lhs)[N], const string_twine& rhs )
+	{
+		return string_twine( lhs, N-1 ).concat( rhs );
+	}
+
+	template < size_t N >
+	inline string_twine operator+( const string_twine& lhs, const char( &rhs )[N] )
+	{
+		return lhs.concat( string_twine( rhs, N - 1 ) );
+	}
+
+}
+
+#endif // NV_STL_STRING_STRING_TWINE_HH
Index: /trunk/src/engine/resource_system.cc
===================================================================
--- /trunk/src/engine/resource_system.cc	(revision 439)
+++ /trunk/src/engine/resource_system.cc	(revision 440)
@@ -12,6 +12,6 @@
 {
 	m_lua = a_lua_state;
-	std::string delete_me = "register_" + std::string( get_resource_name().data(), get_resource_name().size() );
-	lua::register_storage( m_lua, get_storage_name(), string_view( delete_me.c_str(), delete_me.size() ) );
+	string128 storage_name = "register_" + get_resource_name();
+	lua::register_storage( m_lua, get_storage_name(), storage_name );
 }
 
Index: /trunk/src/formats/md5_loader.cc
===================================================================
--- /trunk/src/formats/md5_loader.cc	(revision 439)
+++ /trunk/src/formats/md5_loader.cc	(revision 440)
@@ -14,4 +14,6 @@
 #include <stdio.h>  // sscanf
 #include <stdlib.h> // atof
+
+#include <string> // TODO: remove
 
 using namespace nv;
Index: /trunk/src/gui/gui_ascii_renderer.cc
===================================================================
--- /trunk/src/gui/gui_ascii_renderer.cc	(revision 439)
+++ /trunk/src/gui/gui_ascii_renderer.cc	(revision 440)
@@ -49,6 +49,5 @@
 		er->clear = true;
 		int color = 0;
-		std::string path;
-		std::string text;
+		string128 path;
 		const char* stext[] = { nullptr, "selected", "hover" };
 		const char* selector = stext[0];
Index: /trunk/src/gui/gui_environment.cc
===================================================================
--- /trunk/src/gui/gui_environment.cc	(revision 439)
+++ /trunk/src/gui/gui_environment.cc	(revision 440)
@@ -9,6 +9,4 @@
 #include "nv/gui/gui_renderer.hh"
 
-#include <algorithm> // std::find on std::list
-
 	/*
 
@@ -27,4 +25,5 @@
 	: m_renderer( r )
 {
+	r->set_environment( this );
 	m_screen   = create_element( handle(), m_renderer->get_area() );
 }
@@ -161,5 +160,5 @@
 		while ( !parent->m_children.empty() )
 		{
-			destroy_element( parent->m_children.front() );
+			destroy_element( parent->m_children.back() );
 		}
 	}
@@ -196,4 +195,9 @@
 }
 
+nv::string_view nv::gui::environment::get_string( shash64 h )
+{
+	return m_strings[h];
+}
+
 bool nv::gui::environment::set_selected( handle e )
 {
@@ -235,5 +239,5 @@
 
 	handle result;
-	element::list::reverse_iterator it = el->m_children.rbegin();
+	auto it = el->m_children.rbegin();
 
 	while ( it != el->m_children.rend() )
@@ -254,5 +258,5 @@
 	if ( e && parent )
 	{
-		auto it = std::find( parent->m_children.begin(), parent->m_children.end(), child );
+		auto it = find( parent->m_children.begin(), parent->m_children.end(), child );
 		if ( it != parent->m_children.end() )
 		{
@@ -264,20 +268,4 @@
 }
 
-void nv::gui::environment::move_to_bottom( handle child )
-{
-	element* e      = m_elements.get( child );
-	element* parent = m_elements.get( e->m_parent );
-	if ( e && parent )
-	{
-		auto it = std::find( parent->m_children.begin(), parent->m_children.end(), child );
-		if ( it != parent->m_children.end() )
-		{
-			parent->m_children.erase( it );
-			parent->m_children.push_front( child );
-			parent->m_flags[DIRTY] = true;
-		}
-	}
-}
-
 void nv::gui::environment::set_relative( handle e, const rectangle& r )
 {
@@ -312,20 +300,20 @@
 }
 
-void nv::gui::environment::set_class( handle e, const std::string& text )
+void nv::gui::environment::set_class( handle e, const string_view& text )
 {
 	element* ep = m_elements.get(e);
 	if ( ep != nullptr )
 	{
-		ep->m_class        = text;
+		ep->m_class        = m_strings.insert( text );
 		ep->m_flags[DIRTY] = true;
 	}
 }
 
-void nv::gui::environment::set_text( handle e, const std::string& text )
+void nv::gui::environment::set_text( handle e, const string_twine& text )
 {
 	element* ep = m_elements.get(e);
 	if ( ep != nullptr )
 	{
-		ep->m_text         = text;
+		ep->m_text.assign( text );
 		ep->m_flags[DIRTY] = true;
 	}
@@ -337,12 +325,12 @@
 	if ( p )
 	{
-		auto it = std::find( p->m_children.begin(), p->m_children.end(), child );
+		auto it = find( p->m_children.begin(), p->m_children.end(), child );
 		if ( it != p->m_children.end() )
 		{
 			element* e = m_elements.get( *it );
 			e->m_parent = handle();
-			p->m_children.erase(it);
-		}	
-	}
-}
-
+			p->m_children.erase( it );
+		}
+	}
+}
+
Index: /trunk/src/gui/gui_gfx_renderer.cc
===================================================================
--- /trunk/src/gui/gui_gfx_renderer.cc	(revision 439)
+++ /trunk/src/gui/gui_gfx_renderer.cc	(revision 440)
@@ -243,7 +243,6 @@
 		int border = 0;
 		vec4 color;
-		std::string path;
-		std::string text;
-		const char* stext[] = { nullptr, "selected", "hover" };
+		string128 path;
+		const char* stext[] = { "", "selected", "hover" };
 		const char* selector = stext[border];
 		if ( e->m_flags[HOVER] )    selector = stext[2];
@@ -252,5 +251,5 @@
 		if ( m_style.get( e, "skin", selector, path ) )
 		{
-			size_t image_id = load_image( string_view( path.c_str(), path.size() ) );
+			size_t image_id = load_image( path );
 			const image_info* image = get_image( image_id );
 			if ( image )
@@ -312,13 +311,13 @@
 		}
 
-		text = e->m_text;
-		if ( !text.empty() )
+		e->m_text;
+		if ( !e->m_text.empty() )
 		{
 			if ( m_style.get( e, "text_color", selector, color ) && m_style.get( e, "text_font", selector, path ) && m_style.get( e, "text_size", selector, border ) )
 			{
-				size_t font_id = load_font( string_view( path.c_str(), path.size() ), size_t( border ) );
+				size_t font_id = load_font( path, size_t( border ) );
 				texture_font* font = get_font( font_id );
 				position p = abs.ul + position( 0, border );
-				for ( char c : text )
+				for ( char c : e->m_text )
 				{
 					const texture_glyph* g = font->get_glyph( static_cast<uint16>( c ) );
Index: /trunk/src/gui/gui_style.cc
===================================================================
--- /trunk/src/gui/gui_style.cc	(revision 439)
+++ /trunk/src/gui/gui_style.cc	(revision 440)
@@ -7,4 +7,5 @@
 #include "nv/gui/gui_style.hh"
 
+#include "nv/gui/gui_environment.hh"
 #include <nv/lua/lua_raw.hh>
 
@@ -12,25 +13,23 @@
 using namespace nv::gui;
 
-style::style()
-{
-}
-
 void style::load_style( const string_view& filename )
 {
+	NV_ASSERT_ALWAYS( m_env, "Environment not set in style!" );
 	m_lua.do_file( filename );
 }
 
-bool style::get( element* e, const char* centry, const char* cselector, std::string& s )
+bool style::get( element* e, const string_view& centry, const string_view& cselector, string128& s )
 {
 	lua::stack_guard guard( m_lua );
-	if ( !resolve( e->m_id.c_str(), e->m_class.c_str(), cselector, centry, LUA_TSTRING ) ) return false;
-	s = lua_tostring( m_lua, -1 );
+	if ( !resolve( e->m_id, e->m_class, cselector, centry, LUA_TSTRING ) ) return false;
+	// TODO: create lua_tostringbuffer< size >
+	s.assign( lua_tostring( m_lua, -1 ) );
 	return true;
 }
 
-bool style::get( element* e, const char* centry, const char* cselector, vec4& vec )
+bool style::get( element* e, const string_view& centry, const string_view& cselector, vec4& vec )
 {
 	lua::stack_guard guard( m_lua );
-	if ( !resolve( e->m_id.c_str(), e->m_class.c_str(), cselector, centry, LUA_TTABLE ) ) return false;
+	if ( !resolve( e->m_id, e->m_class, cselector, centry, LUA_TTABLE ) ) return false;
 	vec = vec4();
 	for ( int i = 0; i < 4; ++i )
@@ -44,16 +43,16 @@
 }
 
-bool style::get( element* e, const char* centry, const char* cselector, int& i )
+bool style::get( element* e, const string_view& centry, const string_view& cselector, int& i )
 {
 	lua::stack_guard guard( m_lua );
-	if ( !resolve( e->m_id.c_str(), e->m_class.c_str(), cselector, centry, LUA_TNUMBER ) ) return false;
+	if ( !resolve( e->m_id, e->m_class, cselector, centry, LUA_TNUMBER ) ) return false;
 	i = static_cast< int >( lua_tointeger( m_lua, -1 ) );
 	return true;
 }
 
-bool style::get( element* e, const char* centry, const char* cselector, double& d )
+bool style::get( element* e, const string_view& centry, const string_view& cselector, double& d )
 {
 	lua::stack_guard guard( m_lua );
-	if ( !resolve( e->m_id.c_str(), e->m_class.c_str(), cselector, centry, LUA_TNUMBER ) ) return false;
+	if ( !resolve( e->m_id, e->m_class, cselector, centry, LUA_TNUMBER ) ) return false;
 	d = lua_tonumber( m_lua, -1 );
 	return true;
@@ -64,14 +63,14 @@
 }
 
-bool style::find_entry( const char* cselector, const char* centry, int type )
+bool style::find_entry( const string_view& cselector, const string_view& centry, int type )
 {
 	if ( lua_istable( m_lua, -1 ) )
 	{
-		if ( cselector )
+		if ( !cselector.empty() )
 		{
-			lua_getfield( m_lua, -1, cselector );
+			lua_getfield( m_lua, -1, cselector.data() );
 			if ( lua_istable( m_lua, -1 ) )
 			{
-				lua_getfield( m_lua, -1, centry );
+				lua_getfield( m_lua, -1, centry.data() );
 				if ( lua_type( m_lua, -1 ) == type ) 
 				{
@@ -83,5 +82,5 @@
 		}
 
-		lua_getfield( m_lua, -1, centry );
+		lua_getfield( m_lua, -1, centry.data() );
 		if ( lua_type( m_lua, -1 ) == type ) return true;
 	}
@@ -89,5 +88,5 @@
 }
 
-bool style::resolve( const char* cid, const char* cclass, const char* cselector, const char* centry, int type )
+bool style::resolve( shash64 cid, shash64 cclass, const string_view& cselector, const string_view& centry, int type )
 {
 	lua_getglobal( m_lua, "default" );
@@ -95,12 +94,19 @@
 
 	// check id
-	lua_getfield( m_lua, -1, cid );
-	if ( find_entry( cselector, centry, type ) ) return true;
-	lua_settop( m_lua, global );
-
+	string_view id( m_env->get_string( cid ) );
+	if ( !id.empty() )
+	{
+		lua_getfield( m_lua, -1, id.data() );
+		if ( find_entry( cselector, centry, type ) ) return true;
+		lua_settop( m_lua, global );
+	}
 	// check class
-	lua_getfield( m_lua, -1, cclass );
-	if ( find_entry( cselector, centry, type ) ) return true;
-	lua_settop( m_lua, global );
+	string_view klass( m_env->get_string( cclass ) );
+	if ( !klass.empty() )
+	{
+		lua_getfield( m_lua, -1, klass.data() );
+		if ( find_entry( cselector, centry, type ) ) return true;
+		lua_settop( m_lua, global );
+	}
 
 	// check entry
Index: /trunk/src/lib/gl.cc
===================================================================
--- /trunk/src/lib/gl.cc	(revision 439)
+++ /trunk/src/lib/gl.cc	(revision 440)
@@ -56,21 +56,24 @@
 
 
-static void* load_gl_ext_symbol_impl( const char* name, nv::log_level fail_level = nv::LOG_DEBUG )
-{
-	void* result = gl_ext_loader( name );
+static void* load_gl_ext_symbol_impl( const nv::string_view& name, nv::log_level fail_level = nv::LOG_DEBUG )
+{
+	void* result = gl_ext_loader( name.data() );
 	NV_LOG( ( result ? nv::LOG_DEBUG : fail_level ), "load_gl_ext_symbol : ", name, ( result ? " succeded." : "failed." ) );
 	return result;
 }
 
-static void* load_gl_ext_symbol( const char* name, bool iterate, const char* ext )
+static void* load_gl_ext_symbol( const nv::string_view& name, bool iterate, const nv::string_view& ext )
 {
 	void * result        = nullptr;
-	result = load_gl_ext_symbol_impl( ext ? ( std::string(name) + ext ).c_str() : name );
+	nv::string128 test_name = name + ext;
+	result = load_gl_ext_symbol_impl( !ext.empty() ? test_name : name );
 	if ( result ) return result;
 	if ( iterate )
 	{
-		result = gl_ext_loader( (std::string(name) + "ARB").c_str() );
+		test_name = name + "ARB"_ls;
+		result = gl_ext_loader( test_name.data() );
 		if ( result ) return result;
-		result = gl_ext_loader( (std::string(name) + "EXT").c_str() );
+		test_name = name + "EXT"_ls;
+		result = gl_ext_loader( test_name.data() );
 		if ( result ) return result;
 	}
@@ -255,5 +258,5 @@
 
 #	define NV_GL_FUN_EXT( rtype, symbol, fparams ) \
-	void_assign( symbol, load_gl_ext_symbol(#symbol, true, nullptr) ); \
+	void_assign( symbol, load_gl_ext_symbol(#symbol, true, string_view()) ); \
 	count++; if ( !symbol ) fail_count++;
 
Index: /trunk/src/lua/lua_function.cc
===================================================================
--- /trunk/src/lua/lua_function.cc	(revision 439)
+++ /trunk/src/lua/lua_function.cc	(revision 440)
@@ -21,5 +21,5 @@
 	{
 		lua_pop( L, 1 );
-		NV_LUA_ABORT( "function_base::function_base", "not a valid path - ", a_path.to_string().c_str() );
+		NV_LUA_ABORT( "function_base::function_base", "not a valid path - ", a_path.to_string() );
 	}
 
@@ -27,5 +27,5 @@
 	{
 		lua_pop( L, 1 );
-		NV_LUA_ABORT( "function_base::function_base", "not a valid function - ", a_path.to_string().c_str() );
+		NV_LUA_ABORT( "function_base::function_base", "not a valid function - ", a_path.to_string() );
 	}
 	m_ref = luaL_ref( L, LUA_REGISTRYINDEX );
@@ -64,7 +64,7 @@
 	if ( status != 0 )
 	{
-		std::string error = lua_tostring( L, -1 );
+		string128 error( nlua_tostringview( L, -1 ) );
 		lua_pop( L, 1 );
-		NV_LUA_ABORT( "function_base::call", "call failed - ", error.c_str() );
+		NV_LUA_ABORT( "function_base::call", "call failed - ", error );
 	}
 }
Index: /trunk/src/lua/lua_map_tile.cc
===================================================================
--- /trunk/src/lua/lua_map_tile.cc	(revision 439)
+++ /trunk/src/lua/lua_map_tile.cc	(revision 440)
@@ -16,4 +16,7 @@
 #include "nv/lua/lua_values.hh"
 #include "nv/lua/lua_raw.hh"
+
+// TODO: REMOVE
+#include <string>
 
 static const char* NLUA_MAP_TILE_METATABLE = "map_tile";
Index: /trunk/src/lua/lua_path.cc
===================================================================
--- /trunk/src/lua/lua_path.cc	(revision 439)
+++ /trunk/src/lua/lua_path.cc	(revision 440)
@@ -74,37 +74,22 @@
 }
 
-std::string nv::lua::path::to_string() const
+string128 nv::lua::path::to_string() const
 {
-	char buffer[64];
-	char* start   = buffer;
-	char* current = buffer;
+	string128 buffer;
 	bool dot = false;
-	bool oos = false;
 	for ( const element& e : m_elements )
 	{
-		if ( current - start > 48 ) { oos = true; break; }
-		if ( dot ) *current++ = '.';
+		if ( dot ) buffer.append( "." );
 		if ( e.length == 0 )
 		{
-			*current++ = '[';
-			current += uint32_to_buffer( array_ref< char >( current, current - start ), e.value );
-			*current++ = ']';
+			buffer.append( "["_ls + e.value + "]"_ls );
 			dot = false;
 		}
 		else
 		{
-			if ( size_t(current - start) + e.length > 60 ) { oos = true; break; }
-			nvmemcpy( current, e.str, e.length );
-			current += e.length;
+			buffer.append( e.str, e.length );
 			dot = true;
 		}
 	}
-	if (oos) 
-	{ 
-		*current++ = '.';
-		*current++ = '.';
-		*current++ = '.';
-	}
-	*current++ = '\0';
-	return std::string( buffer, size_t(current - start - 1) );
+	return buffer;
 }
Index: /trunk/src/lua/lua_state.cc
===================================================================
--- /trunk/src/lua/lua_state.cc	(revision 439)
+++ /trunk/src/lua/lua_state.cc	(revision 440)
@@ -116,5 +116,5 @@
 	if ( !p.resolve( m_state, global ) )
 	{
-		NV_LOG_ERROR( "Lua error : not a valid path - ", p.to_string().c_str() );
+		NV_LOG_ERROR( "Lua error : not a valid path - ", p.to_string() );
 		return false;
 	}
@@ -123,5 +123,5 @@
 	{
 		lua_pop( m_state, 1 );
-		NV_LOG_ERROR( "Lua error : not a valid function - ", p.to_string().c_str() );
+		NV_LOG_ERROR( "Lua error : not a valid function - ", p.to_string() );
 		return false;
 	}
@@ -212,23 +212,4 @@
 	lua_pop( m_state, 1 );
 	return shash64( result );
-}
-
-std::string lua::table_guard::get_std_string( string_view element, string_view defval /*= string_view() */ )
-{
-	lua_getfield( m_state, -1, element.data() );
-	size_t l = 0;
-	const char* str = nullptr;
-	if ( lua_type( m_state, -1 ) == LUA_TSTRING )
-	{
-		str = lua_tolstring( m_state, -1, &l );
-	}
-	else
-	{
-		l = defval.size();
-		str = defval.data();
-	}
-	std::string result( str, l );
-	lua_pop( m_state, 1 );
-	return result;
 }
 
@@ -250,4 +231,23 @@
  	lua_pop( m_state, 1 );
  	return result;
+}
+
+string128 lua::table_guard::get_string128( string_view element, string_view defval )
+{
+	lua_getfield( m_state, -1, element.data() );
+	size_t l = 0;
+	const char* str = nullptr;
+	if ( lua_type( m_state, -1 ) == LUA_TSTRING )
+	{
+		str = lua_tolstring( m_state, -1, &l );
+	}
+	else
+	{
+		l = defval.size();
+		str = defval.data();
+	}
+	string128 result( str, l );
+	lua_pop( m_state, 1 );
+	return result;
 }
 
Index: /trunk/src/lua/lua_values.cc
===================================================================
--- /trunk/src/lua/lua_values.cc	(revision 439)
+++ /trunk/src/lua/lua_values.cc	(revision 440)
@@ -65,9 +65,4 @@
 }
 
-void nv::lua::detail::push_string  ( lua_State *L, const std::string& s )
-{
-	lua_pushlstring( L, s.c_str(), s.size() );
-}
-
 void nv::lua::detail::push_cstring ( lua_State *L, const char* s )
 {
@@ -109,11 +104,4 @@
 {
 	return lua_toboolean( L, index ) != 0;
-}
-
-std::string nv::lua::detail::to_string  ( lua_State *L, int index )
-{
-	size_t length = 0;
-	const char* result = lua_tolstring( L, index, &length );
-	return std::string( result, length );
 }
 
@@ -171,7 +159,7 @@
 }
 
-std::string nv::lua::detail::to_string  ( lua_State *L, int index, const std::string& def )
+nv::string_view nv::lua::detail::to_string_view( lua_State *L, int index, string_view def )
 {
-	return ( lua_type( L, index ) == LUA_TSTRING ? lua_tostring( L, index ) : def );
+	return ( lua_type( L, index ) == LUA_TSTRING ? nlua_tostringview( L, index ) : def );
 }
 
Index: /trunk/src/sdl/sdl_window.cc
===================================================================
--- /trunk/src/sdl/sdl_window.cc	(revision 439)
+++ /trunk/src/sdl/sdl_window.cc	(revision 440)
@@ -36,6 +36,6 @@
 	uint32 flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN;
 	if (fullscreen) flags |= SDL_WINDOW_FULLSCREEN;
-	m_title  = "Nova Engine";
-	m_handle = SDL_CreateWindow( m_title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
+	m_title.assign( "Nova Engine" );
+	m_handle = SDL_CreateWindow( m_title.data(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
 		width, height, flags );
 	if ( m_handle == 0 )
@@ -77,8 +77,8 @@
 }
 
-void sdl::window::set_title( const std::string& title )
+void sdl::window::set_title( const string_view& title )
 {
-	SDL_SetWindowTitle( static_cast<SDL_Window*>( m_handle ), title.c_str() );
-	m_title = title;
+	SDL_SetWindowTitle( static_cast<SDL_Window*>( m_handle ), title.data() );
+	m_title.assign( title );
 }
 
Index: /trunk/src/stl/assert.cc
===================================================================
--- /trunk/src/stl/assert.cc	(revision 439)
+++ /trunk/src/stl/assert.cc	(revision 440)
@@ -10,5 +10,5 @@
 extern "C" {
 #if NV_COMPILER == NV_MSVC
-	_ACRTIMP NV_NORETURN void __cdecl exit( _In_ int _Code );
+	NV_NORETURN void __cdecl exit( int _Code );
 #else
 	void exit( int status_code ) NV_NORETURN;
