Index: trunk/src/lua/lua_area.cc
===================================================================
--- trunk/src/lua/lua_area.cc	(revision 376)
+++ trunk/src/lua/lua_area.cc	(revision 378)
@@ -8,5 +8,4 @@
 
 #include "nv/lua/lua_raw.hh"
-#include "nv/stl/string.hh"
 #include "nv/core/random.hh"
 
@@ -325,14 +324,5 @@
 {
 	nv::rectangle a = to_area( L, 1 );
-	std::string s = "(";
-	s += nv::to_string(a.ul.x);
-	s += ",";
-	s += nv::to_string(a.ul.y);
-	s += "x";
-	s += nv::to_string(a.lr.x);
-	s += ",";
-	s += nv::to_string(a.lr.y);
-	s += ")";
-	lua_pushstring( L, s.c_str() );
+	lua_pushfstring( L, "(%d,%dx%d,%d)", a.ul.x, a.ul.y, a.lr.x, a.lr.y );
 	return 1;
 }
Index: trunk/src/lua/lua_glm.cc
===================================================================
--- trunk/src/lua/lua_glm.cc	(revision 376)
+++ trunk/src/lua/lua_glm.cc	(revision 378)
@@ -8,6 +8,6 @@
 
 #include "nv/lua/lua_raw.hh"
-#include "nv/stl/string.hh"
 #include "nv/core/random.hh"
+#include "nv/stl/traits/common.hh"
 
 static size_t nlua_swizzel_lookup[256];
@@ -292,12 +292,14 @@
 {
 	T v = to_vec<T>( L, 1 );
-	std::string s = "(";
-	for ( size_t i = 0; i < v.length(); ++i )
-	{
-		if (i > 0) s += ",";
-		s += nv::to_string(v[i]);
-	}
-	s+=")";
-	lua_pushstring( L, s.c_str() );
+	bool fl = nv::is_floating_point<typename T::value_type>::value;
+	switch ( v.length() )
+	{
+	case 1: lua_pushfstring( L, ( fl ? "(%f)"          : "(%d)" ),          v[0] );
+	case 2: lua_pushfstring( L, ( fl ? "(%f,%f)"       : "(%d,%d)" ),       v[0], v[1] );
+	case 3: lua_pushfstring( L, ( fl ? "(%f,%f,%f)"    : "(%d,%d,%d)" ),    v[0], v[1], v[2] );
+	case 4: lua_pushfstring( L, ( fl ? "(%f,%f,%f,%f)" : "(%d,%d,%d,%d)" ), v[0], v[1], v[2], v[3] );
+	default:
+		lua_pushliteral( L, "(vector?)" ); break;
+	}
 	return 1;
 }
Index: trunk/src/lua/lua_map_tile.cc
===================================================================
--- trunk/src/lua/lua_map_tile.cc	(revision 376)
+++ trunk/src/lua/lua_map_tile.cc	(revision 378)
@@ -55,6 +55,11 @@
 	nv::map_area* map_area = nv::lua::detail::to_map_area( L, 3 );
 	lua_settop( L, 2 );
-	std::string code = nv::trimmed( lua_tostring( L, 1 ) );
-	nv::remove_chars( code, " \r\t" );
+	std::string code = nv::trimmed( lua_tostring( L, 1 ) ).to_string();
+	std::string chars( " \r\t" );
+	code.erase( nv::remove_if( code.begin(), code.end(),
+		[&chars] ( const char& c )
+	{
+		return chars.find( c ) != std::string::npos;
+	} ), code.end() );
 
 	map_tile tile;
