diff --git a/include/ipc.h b/include/ipc.h
index f13e32da488fd07ceaf05f9c04d4efafd0298ae8..a2eccedb0fd10b826f53ab3a1a7c4664e80863f0 100644
--- a/include/ipc.h
+++ b/include/ipc.h
@@ -1,5 +1,5 @@
-#ifndef TARANTOOL_IFC_H_INCLUDED
-#define TARANTOOL_IFC_H_INCLUDED
+#ifndef TARANTOOL_IPC_H_INCLUDED
+#define TARANTOOL_IPC_H_INCLUDED
 /*
  * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
@@ -177,4 +177,4 @@ ipc_channel_has_writers(struct ipc_channel *ch);
 
 extern const ev_tstamp IPC_TIMEOUT_INFINITY;
 
-#endif /* TARANTOOL_IFC_H_INCLUDED */
+#endif /* TARANTOOL_IPC_H_INCLUDED */
diff --git a/include/tarantool.h b/include/tarantool.h
index 4fc14067f8253fa241188c975216816c57d3a1e2..5c6c63e41783885fb57343d6fe5dc92192c5b180 100644
--- a/include/tarantool.h
+++ b/include/tarantool.h
@@ -35,6 +35,7 @@ struct tarantool_cfg;
 struct tbuf;
 struct log_io;
 struct fio_batch;
+struct lua_State;
 
 void mod_init(void);
 void mod_free(void);
@@ -42,6 +43,7 @@ void mod_free(void);
 extern const char *mod_name;
 i32 mod_check_config(struct tarantool_cfg *conf);
 i32 mod_reload_config(struct tarantool_cfg *old_conf, struct tarantool_cfg *new_conf);
+void mod_lua_load_cfg(struct lua_State *L);
 int mod_cat(const char *filename);
 void mod_snapshot(struct log_io *, struct fio_batch *batch);
 void mod_info(struct tbuf *out);
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f4b27c6cd65692daefd12ca0ec80fd4c6bfd9b8b..bc8a9e86c87a000eb08fbb29e2d8e10c0923ab7a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -132,7 +132,6 @@ set (common_sources
      lua/slab.m
      lua/uuid.m
      lua/lua_ipc.m
-     lua/space.m
 )
 
 if (ENABLE_TRACE)
diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt
index 3675aa94f93ff6d3a356aee9b3a3c1277ad6b546..cd7d531ac52387748aa11a38e9f1055ece22a042 100644
--- a/src/box/CMakeLists.txt
+++ b/src/box/CMakeLists.txt
@@ -26,4 +26,4 @@ add_custom_target(generate_lua_sources}
 set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${lua_sources})
 
 tarantool_module("box" tuple.m index.m tree.m space.m port.m request.m
-    txn.m box.m ${lua_sources} box_lua.m)
+    txn.m box.m ${lua_sources} box_lua.m box_lua_space.m)
diff --git a/src/box/box.lua b/src/box/box.lua
index 238aee1925e61f03b217b8755964a74989895dd1..978773879230122f3666ff3e43f7704d1c57000a 100644
--- a/src/box/box.lua
+++ b/src/box/box.lua
@@ -254,7 +254,7 @@ function box.bless_space(space)
     end
     space_mt.pairs = function(space) return space.index[0]:pairs() end
     space_mt.__index = space_mt
-    
+
     setmetatable(space, space_mt)
     if type(space.index) == 'table' and space.enabled then
         for j, index in pairs(space.index) do
diff --git a/src/lua/space.h b/src/box/box_lua_space.h
similarity index 99%
rename from src/lua/space.h
rename to src/box/box_lua_space.h
index a6ee38d2a449cb8aaa658b3ebe2f4ff106c4653e..0ce25b473ae8ca4b869e795439345c475af6452e 100644
--- a/src/lua/space.h
+++ b/src/box/box_lua_space.h
@@ -1,3 +1,5 @@
+#ifndef INCLUDES_TARANTOOL_LUA_SPACE_H
+#define INCLUDES_TARANTOOL_LUA_SPACE_H
 /*
  * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
@@ -26,11 +28,6 @@
  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-
-#ifndef INCLUDES_TARANTOOL_LUA_SPACE_H
-#define INCLUDES_TARANTOOL_LUA_SPACE_H
-
-
 struct lua_State;
 struct space;
 
diff --git a/src/lua/space.m b/src/box/box_lua_space.m
similarity index 78%
rename from src/lua/space.m
rename to src/box/box_lua_space.m
index c3526535c759e263de0935e665fae7213ee1fcd9..72bbfbee3bacbcb0b393cae5e0d1939876b6f5cb 100644
--- a/src/lua/space.m
+++ b/src/box/box_lua_space.m
@@ -26,15 +26,20 @@
  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-
+#include "box_lua_space.h"
 #include "space.h"
-#include "../box/space.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lualib.h"
 #include <say.h>
 
-
+/**
+ * Make a single space available in Lua,
+ * via box.space[] array.
+ *
+ * @return A new table representing a space on top of the Lua
+ * stack.
+ */
 int
 lbox_pushspace(struct lua_State *L, struct space *space)
 {
@@ -63,31 +68,29 @@ lbox_pushspace(struct lua_State *L, struct space *space)
 	/* space.index */
 	lua_pushstring(L, "index");
 	lua_newtable(L);
-
-
-	for(int i = 0; i < space->key_count; i++) {
+	/*
+	 * Fill space.index table with
+	 * all defined indexes.
+	 */
+	for (int i = 0; i < space->key_count; i++) {
 		lua_pushnumber(L, i);
 		lua_newtable(L);		/* space.index[i] */
 
-		lua_pushstring(L, "idx");
-		lua_pushfstring(L, "index %d in space %d", i, space->no);
-		lua_settable(L, -3);
-
 		lua_pushstring(L, "unique");
 		lua_pushboolean(L, space->key_defs[i].is_unique);
 		lua_settable(L, -3);
 
 		lua_pushstring(L, "type");
-		switch(space->key_defs[i].type) {
-			case HASH:
-				lua_pushstring(L, "HASH");
-				break;
-			case TREE:
-				lua_pushstring(L, "TREE");
-				break;
-			default:
-				panic("unknown index type %d",
-					space->key_defs[i].parts[0].type);
+		switch (space->key_defs[i].type) {
+		case HASH:
+			lua_pushstring(L, "HASH");
+			break;
+		case TREE:
+			lua_pushstring(L, "TREE");
+			break;
+		default:
+			panic("unknown index type %d",
+				space->key_defs[i].parts[0].type);
 		}
 		lua_settable(L, -3);
 
@@ -99,19 +102,19 @@ lbox_pushspace(struct lua_State *L, struct space *space)
 			lua_newtable(L);
 
 			lua_pushstring(L, "type");
-			switch(space->key_defs[i].parts[j].type) {
-				case NUM:
-					lua_pushstring(L, "NUM");
-					break;
-				case NUM64:
-					lua_pushstring(L, "NUM64");
-					break;
-				case STRING:
-					lua_pushstring(L, "STR");
-					break;
-				default:
-					lua_pushstring(L, "UNKNOWN");
-					break;
+			switch (space->key_defs[i].parts[j].type) {
+			case NUM:
+				lua_pushstring(L, "NUM");
+				break;
+			case NUM64:
+				lua_pushstring(L, "NUM64");
+				break;
+			case STRING:
+				lua_pushstring(L, "STR");
+				break;
+			default:
+				lua_pushstring(L, "UNKNOWN");
+				break;
 			}
 			lua_settable(L, -3);
 
@@ -129,15 +132,10 @@ lbox_pushspace(struct lua_State *L, struct space *space)
 
 	lua_settable(L, -3);	/* push space.index */
 
-
-	/* on_reload_configuration hook */
 	lua_getfield(L, LUA_GLOBALSINDEX, "box");
 	lua_pushstring(L, "bless_space");
 	lua_gettable(L, -2);
 
-	if (!lua_isfunction(L, -1))
-		panic("box.bless_space isn't a function");
-
 	lua_pushvalue(L, -3);			/* box, bless, space */
 	lua_call(L, 1, 0);
 	lua_pop(L, 1);	/* cleanup stack */
@@ -145,6 +143,9 @@ lbox_pushspace(struct lua_State *L, struct space *space)
 	return 1;
 }
 
+/**
+ * A callback adapter for space_foreach().
+ */
 static void
 lbox_add_space(struct space *space, struct lua_State *L)
 {
@@ -153,8 +154,12 @@ lbox_add_space(struct space *space, struct lua_State *L)
 	lua_settable(L, -3);
 }
 
+/**
+ * Make all spaces available in Lua via box.space
+ * array.
+ */
 void
-lbox_space_init(struct lua_State *L)
+mod_lua_load_cfg(struct lua_State *L)
 {
 	lua_getfield(L, LUA_GLOBALSINDEX, "box");
 	lua_pushstring(L, "space");
diff --git a/src/lua/init.m b/src/lua/init.m
index e1b7beae3e0255247e80861562f5da2ea87eee59..d46e469f1b4b93197a6c1f5722e7f31bf62f88ae 100644
--- a/src/lua/init.m
+++ b/src/lua/init.m
@@ -39,16 +39,15 @@
 #include "lj_cdata.h"
 #include "lj_cconv.h"
 #include "lj_state.h"
+#include <ctype.h>
 
 #include "pickle.h"
 #include "fiber.h"
 #include "lua_ipc.h"
-#include <ctype.h>
 #include "lua/info.h"
 #include "lua/slab.h"
 #include "lua/stat.h"
 #include "lua/uuid.h"
-#include "space.h"
 
 #include TARANTOOL_CONFIG
 
@@ -1380,8 +1379,7 @@ tarantool_lua_load_cfg(struct lua_State *L, struct tarantool_cfg *cfg)
 		       "  table[index] = {}\n"
 		       "  setmetatable(table[index], getmetatable(table))\n"
 		       "  return rawget(table, index)\n"
-		       "end\n"
-	);
+		       "end\n");
 	while ((key = tarantool_cfg_iterator_next(i, cfg, &value)) != NULL) {
 		if (value == NULL)
 			continue;
@@ -1399,8 +1397,7 @@ tarantool_lua_load_cfg(struct lua_State *L, struct tarantool_cfg *cfg)
 		       "function(table, index)\n"
 		       "  error('Attempt to modify a read-only table')\n"
 		       "end\n"
-		       "getmetatable(box.cfg).__index = nil\n"
-	);
+		       "getmetatable(box.cfg).__index = nil\n");
 	luaL_pushresult(&b);
 	if (luaL_loadstring(L, lua_tostring(L, -1)) != 0 ||
 	    lua_pcall(L, 0, 0, 0) != 0) {
@@ -1408,14 +1405,18 @@ tarantool_lua_load_cfg(struct lua_State *L, struct tarantool_cfg *cfg)
 	}
 	lua_pop(L, 1);	/* cleanup stack */
 
-	lbox_space_init(L);
-
-	/* on_reload_configuration hook */
+	mod_lua_load_cfg(L);
+	/*
+	 * Invoke a user-defined on_reload_configuration hook,
+	 * if it exists. Do it after everything else is done.
+	 */
 	lua_getfield(L, LUA_GLOBALSINDEX, "box");
 	lua_pushstring(L, "on_reload_configuration");
 	lua_gettable(L, -2);
-	if (lua_isfunction(L, -1))
-		lua_call(L, 0, 0);
+	if (lua_isfunction(L, -1) && lua_pcall(L, 0, 0, 0) != 0) {
+		say_error("on_reload_configuration() hook failed: %s",
+			  lua_tostring(L, -1));
+	}
 	lua_pop(L, 1);	/* cleanup stack */
 }
 
diff --git a/src/lua/lua_ipc.m b/src/lua/lua_ipc.m
index 986bd1badc63b064bbcb6bd0712c5a473a6b3217..802fe2fb13d3670e79386004f7cb55337b3c303a 100644
--- a/src/lua/lua_ipc.m
+++ b/src/lua/lua_ipc.m
@@ -27,13 +27,15 @@
  * SUCH DAMAGE.
  */
 #include "lua_ipc.h"
-#include <ipc.h>
+
+#include <stdlib.h>
+
 #include "lua.h"
 #include "lauxlib.h"
 #include "lualib.h"
 
-#include <lua/init.h>
-#include <stdlib.h>
+#include "ipc.h"
+#include "lua/init.h"
 
 static const char channel_lib[]   = "box.ipc.channel";
 
@@ -75,7 +77,6 @@ lbox_check_channel(struct lua_State *L, int narg)
 	return * (void **) luaL_checkudata(L, narg, channel_lib);
 }
 
-
 static int
 lbox_ipc_channel_gc(struct lua_State *L)
 {
@@ -87,7 +88,6 @@ lbox_ipc_channel_gc(struct lua_State *L)
 	return 0;
 }
 
-
 static int
 lbox_ipc_channel_is_full(struct lua_State *L)
 {
diff --git a/test/box/lua.result b/test/box/lua.result
index 4e07b733394e67fba4f128c75fa68ca443c1924a..c60791ec19698c099ce16ab6361a1f249a4962eb 100644
--- a/test/box/lua.result
+++ b/test/box/lua.result
@@ -699,11 +699,12 @@ lua box.fiber.resume(f, 'hello', 'world')
 ...
 lua box.fiber.resume(f, 'wide')
 ---
-error: 'fiber.resume(): the fiber is dead'
+ - world
+ - wide
 ...
 lua box.fiber.resume(f)
 ---
-error: 'fiber.resume(): the fiber is dead'
+ - true
 ...
 lua function y() print('started') box.fiber.detach() while true do box.replace(0, 'test', os.time()) box.fiber.sleep(0.001) end end
 ---