diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk
index c3982c370f447136ad16ae4df1473a8c576a2713..a35084433cc7d7b2ecaa2a7d92e5050969828726 100644
--- a/build/android/jni/Android.mk
+++ b/build/android/jni/Android.mk
@@ -196,7 +196,6 @@ LOCAL_SRC_FILES :=                                \
 		jni/src/staticobject.cpp                  \
 		jni/src/subgame.cpp                       \
 		jni/src/test.cpp                          \
-		jni/src/tile.cpp                          \
 		jni/src/tool.cpp                          \
 		jni/src/treegen.cpp                       \
 		jni/src/version.cpp                       \
@@ -214,7 +213,8 @@ LOCAL_SRC_FILES :=                                \
 		jni/src/database-leveldb.cpp              \
 		jni/src/settings.cpp                      \
 		jni/src/wieldmesh.cpp                     \
-		jni/src/client/clientlauncher.cpp
+		jni/src/client/clientlauncher.cpp         \
+		jni/src/client/tile.cpp
 
 # Network
 LOCAL_SRC_FILES +=                                \
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6aa1a35a17cc1d82eebc7f01997815159d3b181a..d56ec18c0539ac43ef135d5673b6104e0598fb6c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -499,7 +499,6 @@ set(minetest_SRCS
 	particles.cpp
 	shader.cpp
 	sky.cpp
-	tile.cpp
 	wieldmesh.cpp
 	${minetest_SCRIPT_SRCS}
 )
diff --git a/src/camera.h b/src/camera.h
index 3f10b87d7887ffd26cd74627ab88a915b9ecd870..b5373886087b6e5d6ea2e99a661f4cd9beeae920 100644
--- a/src/camera.h
+++ b/src/camera.h
@@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "irrlichttypes_extrabloated.h"
 #include "inventory.h"
 #include "mesh.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "util/numeric.h"
 #include <ICameraSceneNode.h>
 
diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt
index 8cd981aca96294b19bfba94944e679103a6e8c8c..288acf14cb19e7603b300000861eb1bf11728eb2 100644
--- a/src/client/CMakeLists.txt
+++ b/src/client/CMakeLists.txt
@@ -1,4 +1,5 @@
 set(client_SRCS
 	${CMAKE_CURRENT_SOURCE_DIR}/clientlauncher.cpp
+	${CMAKE_CURRENT_SOURCE_DIR}/tile.cpp
 	PARENT_SCOPE
-)
\ No newline at end of file
+)
diff --git a/src/tile.cpp b/src/client/tile.cpp
similarity index 99%
rename from src/tile.cpp
rename to src/client/tile.cpp
index 81b362d616f2c61e249fea235c1dca49b996bbf9..e5d02de7c9f26784be1bbed3e978407d5d983758 100644
--- a/src/tile.cpp
+++ b/src/client/tile.cpp
@@ -407,7 +407,7 @@ class TextureSource : public IWritableTextureSource
 
 	// Textures that have been overwritten with other ones
 	// but can't be deleted because the ITexture* might still be used
-	std::list<video::ITexture*> m_texture_trash;
+	std::vector<video::ITexture*> m_texture_trash;
 
 	// Cached settings needed for making textures from meshes
 	bool m_setting_trilinear_filter;
@@ -455,10 +455,9 @@ TextureSource::~TextureSource()
 	}
 	m_textureinfo_cache.clear();
 
-	for (std::list<video::ITexture*>::iterator iter =
+	for (std::vector<video::ITexture*>::iterator iter =
 			m_texture_trash.begin(); iter != m_texture_trash.end();
-			iter++)
-	{
+			iter++) {
 		video::ITexture *t = *iter;
 
 		//cleanup trashed texture
diff --git a/src/tile.h b/src/client/tile.h
similarity index 100%
rename from src/tile.h
rename to src/client/tile.h
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index ddfa3b0320daf25525520543baff2cc001191718..5c3c7b54cb984a32cd1486eee1060afc442d9863 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "util/numeric.h" // For IntervalLimiter
 #include "util/serialize.h"
 #include "util/mathconstants.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "environment.h"
 #include "collision.h"
 #include "settings.h"
diff --git a/src/content_cso.cpp b/src/content_cso.cpp
index 4779b20d1262fb7a218c35013a2a1934ee627d9e..c337472ffa93b0d406e0b8cf85a5a850f52630e0 100644
--- a/src/content_cso.cpp
+++ b/src/content_cso.cpp
@@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "content_cso.h"
 #include <IBillboardSceneNode.h>
-#include "tile.h"
+#include "client/tile.h"
 #include "environment.h"
 #include "gamedef.h"
 #include "log.h"
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp
index 54b9ac99f55213281b1823f14bc2173f1c6ba8d2..5bb787d019db95aa36a13a0c10051d56b558edd4 100644
--- a/src/content_mapblock.cpp
+++ b/src/content_mapblock.cpp
@@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "mapblock_mesh.h" // For MapBlock_LightColor() and MeshCollector
 #include "settings.h"
 #include "nodedef.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "mesh.h"
 #include <IMeshManipulator.h>
 #include "gamedef.h"
diff --git a/src/game.cpp b/src/game.cpp
index 1fe1c4163f0965dd5c0e6325fcea2d9e0f8d684c..af76d2e02eb92e64f246e0de3acdff2ee791687e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -51,7 +51,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "nodemetadata.h"
 #include "main.h" // For g_settings
 #include "itemdef.h"
-#include "tile.h" // For TextureSource
+#include "client/tile.h" // For TextureSource
 #include "shader.h" // For ShaderSource
 #include "logoutputbuffer.h"
 #include "subgame.h"
diff --git a/src/guiChatConsole.cpp b/src/guiChatConsole.cpp
index 8210e0bf42bc0ded0cce7e395e4d4e1cd910ef42..b52589044ab018f7f2e7bef8d706f346cd05d223 100644
--- a/src/guiChatConsole.cpp
+++ b/src/guiChatConsole.cpp
@@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "settings.h"
 #include "main.h"  // for g_settings
 #include "porting.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "fontengine.h"
 #include "log.h"
 #include "gettext.h"
diff --git a/src/guiEngine.cpp b/src/guiEngine.cpp
index de6f44134ddb835faa3dde924de0e098c26fa794..b45011c2c4237638766e6dd7dd9e953e426bae39 100644
--- a/src/guiEngine.cpp
+++ b/src/guiEngine.cpp
@@ -38,7 +38,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "fontengine.h"
 
 #ifdef __ANDROID__
-#include "tile.h"
+#include "client/tile.h"
 #include <GLES/gl.h>
 #endif
 
diff --git a/src/guiEngine.h b/src/guiEngine.h
index 0be8634ddd3cf31d1b7a8ff10446edf40fea1cc7..e57573220b107f8136756d389a3dda6429b9ded2 100644
--- a/src/guiEngine.h
+++ b/src/guiEngine.h
@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "modalMenu.h"
 #include "guiFormSpecMenu.h"
 #include "sound.h"
-#include "tile.h"
+#include "client/tile.h"
 
 /******************************************************************************/
 /* Typedefs and macros                                                        */
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index a3cc0313108bf1986dbfd5f88ed30feece2f9a5b..581da894b4cb412e2c3e7328be4fb26115c849d5 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <IGUITabControl.h>
 #include <IGUIComboBox.h>
 #include "log.h"
-#include "tile.h" // ITextureSource
+#include "client/tile.h" // ITextureSource
 #include "hud.h" // drawItemStack
 #include "filesys.h"
 #include "gettime.h"
diff --git a/src/guiTable.cpp b/src/guiTable.cpp
index 05db228da3d7fe95a2f2ec40274aafd443dbac06..a7a53f581e2f61d9edb64ebc3eb8cebf10909948 100644
--- a/src/guiTable.cpp
+++ b/src/guiTable.cpp
@@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <IGUIScrollBar.h>
 #include "debug.h"
 #include "log.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "gettime.h"
 #include "util/string.h"
 #include "util/numeric.h"
diff --git a/src/hud.cpp b/src/hud.cpp
index 29ebb810309501e67d5c73a15793143f998fcec8..aabaa066c597e308c4d7693efa8158be8b93d24c 100644
--- a/src/hud.cpp
+++ b/src/hud.cpp
@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "gamedef.h"
 #include "itemdef.h"
 #include "inventory.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "localplayer.h"
 #include "camera.h"
 #include "porting.h"
diff --git a/src/itemdef.cpp b/src/itemdef.cpp
index 3b4d2596ab0467be3e6b2dc0d4249b2c9435c30b..381773bb4b1e3c95a6a16d408556dd91238b7e2d 100644
--- a/src/itemdef.cpp
+++ b/src/itemdef.cpp
@@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "mapblock_mesh.h"
 #include "mesh.h"
 #include "wieldmesh.h"
-#include "tile.h"
+#include "client/tile.h"
 #endif
 #include "log.h"
 #include "main.h" // g_settings
diff --git a/src/mapblock_mesh.h b/src/mapblock_mesh.h
index 98af92c74c396e4019845182c2e2afed6bc96dff..b334ce46914c4fae321bdb9c5fa962574c63b7e6 100644
--- a/src/mapblock_mesh.h
+++ b/src/mapblock_mesh.h
@@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define MAPBLOCK_MESH_HEADER
 
 #include "irrlichttypes_extrabloated.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "voxel.h"
 #include <map>
 
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index bcf51a072e1429e9f75d8c93b6e1e1786564fa6b..ac49b4f3cfad295342b9a31e48e52c6c07a70434 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "main.h" // For g_settings
 #include "itemdef.h"
 #ifndef SERVER
-#include "tile.h"
+#include "client/tile.h"
 #include "mesh.h"
 #include <IMeshManipulator.h>
 #endif
diff --git a/src/nodedef.h b/src/nodedef.h
index 7280bb8ea727af0e052f2b7569530cb3fee0db61..52ef29e50ec15e6f9e78c0f43c2a3d3277095ade 100644
--- a/src/nodedef.h
+++ b/src/nodedef.h
@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <list>
 #include "mapnode.h"
 #ifndef SERVER
-#include "tile.h"
+#include "client/tile.h"
 #include "shader.h"
 #endif
 #include "itemgroup.h"
diff --git a/src/particles.cpp b/src/particles.cpp
index 64b8936bd7154e7d9c230007141302b12d8f09fc..a137aaaba54347f807e7bad3985163b707511c31 100644
--- a/src/particles.cpp
+++ b/src/particles.cpp
@@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "debug.h"
 #include "main.h" // For g_profiler and g_settings
 #include "settings.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "gamedef.h"
 #include "collision.h"
 #include <stdlib.h>
diff --git a/src/particles.h b/src/particles.h
index d7f1147f16cf07b5a145f83ddee0ef7918d431b3..2bc2e7bfa813200943a85001c5ee375de58b9fca 100644
--- a/src/particles.h
+++ b/src/particles.h
@@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include <iostream>
 #include "irrlichttypes_extrabloated.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "localplayer.h"
 #include "environment.h"
 
diff --git a/src/shader.cpp b/src/shader.cpp
index 1670458040f07da0052fa9e5fa7d6f544319a7f7..8c572ed49c4577e4a9c7ff2d188604151ab31e12 100644
--- a/src/shader.cpp
+++ b/src/shader.cpp
@@ -36,7 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "log.h"
 #include "gamedef.h"
 #include "strfnd.h" // trim()
-#include "tile.h"
+#include "client/tile.h"
 
 /*
 	A cache from shader name to shader path
diff --git a/src/sky.cpp b/src/sky.cpp
index 664ed694b397b6d894514118301422def46a328c..ac8e2cbf6d512a698ed5bfbfcd4011a33a2d3719 100644
--- a/src/sky.cpp
+++ b/src/sky.cpp
@@ -3,7 +3,7 @@
 #include "ISceneManager.h"
 #include "ICameraSceneNode.h"
 #include "S3DVertex.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "noise.h" // easeCurve
 #include "main.h" // g_profiler
 #include "profiler.h"
diff --git a/src/subgame.cpp b/src/subgame.cpp
index fd2679eaea1e0be4c361d78de6f43ece33dcb7af..ccf477e8f4476b8089898306d3f55b34b5b93e3a 100644
--- a/src/subgame.cpp
+++ b/src/subgame.cpp
@@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "log.h"
 #include "strfnd.h"
 #ifndef SERVER
-#include "tile.h" // getImagePath
+#include "client/tile.h" // getImagePath
 #endif
 #include "util/string.h"
 
diff --git a/src/touchscreengui.h b/src/touchscreengui.h
index 4fe731513d24931860ef5fad3f0d2ca39675141f..a00df5c47e1971d3602fe7c1c0b7e18bef28c883 100644
--- a/src/touchscreengui.h
+++ b/src/touchscreengui.h
@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <map>
 
 #include "game.h"
-#include "tile.h"
+#include "client/tile.h"
 
 using namespace irr;
 using namespace irr::core;
diff --git a/src/wieldmesh.cpp b/src/wieldmesh.cpp
index 7c16bddcbdb282af08ac465ab970c5f931013288..a2be55544f945c720ec192a18076928709d04cbb 100644
--- a/src/wieldmesh.cpp
+++ b/src/wieldmesh.cpp
@@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "nodedef.h"
 #include "mesh.h"
 #include "mapblock_mesh.h"
-#include "tile.h"
+#include "client/tile.h"
 #include "log.h"
 #include "util/numeric.h"
 #include <map>