diff --git a/doc/doxygen/doxygen.source b/doc/doxygen/doxygen.source
index ccdf3448f180c8c7f60eeb2004c42366dcd13f11..375234d26a3c53f531271cfd4fbaf19946d6a103 100644
--- a/doc/doxygen/doxygen.source
+++ b/doc/doxygen/doxygen.source
@@ -145,10 +145,6 @@
  *   merged in docs.
  */
 
-/** \defgroup blo readblenfile
- *  \ingroup blender data
- */
-
 /** \defgroup quicktime quicktime
  *  \ingroup blender
 
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index af1fb3565f67455585939c2663f1f8a816260894..a073f5083e51e4d83f21c1e81ce491ebe7635f0c 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -91,7 +91,6 @@ add_subdirectory(blenlib)
 add_subdirectory(render)
 add_subdirectory(blenfont)
 add_subdirectory(blenloader)
-add_subdirectory(readblenfile)
 add_subdirectory(blenpluginapi)
 add_subdirectory(ikplugin)
 add_subdirectory(gpu)
diff --git a/source/blender/SConscript b/source/blender/SConscript
index 549725a57a07ae95c59097d5650f63a49c890d11..969bd2966fcb0f1e44410f3729d539f7894bb5d8 100644
--- a/source/blender/SConscript
+++ b/source/blender/SConscript
@@ -12,7 +12,6 @@ SConscript(['avi/SConscript',
             'imbuf/SConscript',
             'makesdna/SConscript',
             'makesrna/SConscript',
-            'readblenfile/SConscript',
             'render/SConscript',
             'nodes/SConscript',
             'modifiers/SConscript',
diff --git a/source/blender/readblenfile/test/test.c b/source/blender/blenloader/BLO_runtime.h
similarity index 70%
rename from source/blender/readblenfile/test/test.c
rename to source/blender/blenloader/BLO_runtime.h
index 647df053c389a0eafa95bd509ef616a2a314e17d..920b14e92fa70bab393d64320dcab5544221290f 100644
--- a/source/blender/readblenfile/test/test.c
+++ b/source/blender/blenloader/BLO_runtime.h
@@ -25,27 +25,29 @@
  * Contributor(s): none yet.
  *
  * ***** END GPL LICENSE BLOCK *****
+ * 
+ */
+
+#ifndef BLO_RUNTIME_H
+#define BLO_RUNTIME_H
+
+/** \file BLO_runtime.h
+ *  \ingroup blenloader
  */
-#include <string.h>    // strlen
-#include "BLO_readblenfile.h"
-
-struct streamGlueControlStruct *Global_streamGlueControl;
-
-		int
-streamGlueWrite(
-		struct streamGlueControlStruct *streamGlueControl,
-		struct streamGlueStruct **streamGlue,
-		unsigned char *data,
-		unsigned int dataIn,
-		int finishUp)
-{
-	printf("called with %d bytes in buffer [%s]\n", dataIn, data);
-	return (0);
-}
 
-main()
-{
-	int err;
+#ifdef __cplusplus
+extern "C" {
+#endif
 
-	err = BLO_readblenfile();
+struct BlendFileData;
+struct ReportList;
+
+int BLO_is_a_runtime(char *file);
+struct BlendFileData *BLO_read_runtime(char *file, struct ReportList *reports);
+
+#ifdef __cplusplus
 }
+#endif
+
+#endif /* BLO_RUNTIME_H */
+
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index 4d8ac9bc4b648a3b8a1d97be64a02b291bb07cc6..888cf3148e3b1a3b57a71f8b494ef8a16f4ff4ca 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -29,7 +29,6 @@ set(INC
 	../blenlib
 	../blenkernel
 	../makesdna
-	../readblenfile
 	../makesrna
 	../render/extern/include
 	../../../intern/guardedalloc
@@ -39,10 +38,12 @@ set(INC
 set(SRC
 	intern/readblenentry.c
 	intern/readfile.c
+	intern/runtime.c
 	intern/undofile.c
 	intern/writefile.c
 
 	BLO_readfile.h
+	BLO_runtime.h
 	BLO_soundfile.h
 	BLO_sys_types.h
 	BLO_undofile.h
diff --git a/source/blender/blenloader/SConscript b/source/blender/blenloader/SConscript
index 695d17f06383f1174c14787743f610703202b129..be9908d84e66350091ac69f80548191807e5d1e4 100644
--- a/source/blender/blenloader/SConscript
+++ b/source/blender/blenloader/SConscript
@@ -4,7 +4,7 @@ Import ('env')
 sources = env.Glob('intern/*.c')
 
 incs = '. #/intern/guardedalloc ../blenlib ../blenkernel'
-incs += ' ../makesdna ../readblenfile ../editors/include'
+incs += ' ../makesdna ../editors/include'
 incs += ' ../render/extern/include ../makesrna'
 
 incs += ' ' + env['BF_ZLIB_INC']
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 39fab1929da6b8eb7fc3206ff1aaa929c10dcba0..214f637ea6c8ed9b9afa3b92f02dfa8b7cc8a317 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -62,8 +62,6 @@
 
 #include "readfile.h"
 
-#include "BLO_readblenfile.h"
-
 #include "BLO_sys_types.h" // needed for intptr_t
 
 #ifdef _WIN32
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index e1b13e0ee50b3afea4aa64ae9052a29466d2909c..afa571769ab1f900ea1299d46aae02efa190ba7f 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -137,7 +137,6 @@
 //XXX #include "BIF_previewrender.h" // bedlelvel, for struct RenderInfo
 #include "BLO_readfile.h"
 #include "BLO_undofile.h"
-#include "BLO_readblenfile.h" // streaming read pipe, for BLO_readblenfile BLO_readblenfilememory
 
 #include "readfile.h"
 
diff --git a/source/blender/readblenfile/intern/BLO_readblenfile.c b/source/blender/blenloader/intern/runtime.c
similarity index 63%
rename from source/blender/readblenfile/intern/BLO_readblenfile.c
rename to source/blender/blenloader/intern/runtime.c
index 351de4bd2153a16f7905b959a1dfd90d72397c1b..f5308b5ea5c6c4b1d67d37cd1fb6b1e3eed733b4 100644
--- a/source/blender/readblenfile/intern/BLO_readblenfile.c
+++ b/source/blender/blenloader/intern/runtime.c
@@ -27,11 +27,13 @@
  * ***** END GPL LICENSE BLOCK *****
  *
  */
+
 /**
- * \file BLO_readblenfile.c
- * \brief This file handles the loading if .blend files
- * \ingroup blo
+ * \file runtime.c
+ * \brief This file handles the loading of .blend files embedded in runtimes
+ * \ingroup blenloader
  */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -46,90 +48,56 @@
 #endif
 
 #include "BLO_readfile.h"
-#include "BLO_readblenfile.h"
+#include "BLO_runtime.h"
 
 #include "BKE_blender.h"
 #include "BKE_report.h"
+#include "BKE_utildefines.h"
 
 #include "BLI_blenlib.h"
 
-/** Magic number for the file header */
-const char *headerMagic = "BLENDFI";
-
-/**
- * \brief Set the version number into the array.
- *
- * version contains the integer number of the version
- * i.e. 227
- * array[1] gets set to the div of the number by 100 i.e. 2
- * array[2] gets the remainder i.e. 27
- */
-void BLO_setversionnumber(char array[4], int version)
-{
-	memset(array, 0, sizeof(char)*4);
-
-	array[1] = version / 100;
-	array[2] = version % 100;
-}
-
-/**
- * Sets version number using BLENDER_VERSION
- * Function that calls the setversionnumber(char[],int) with 
- * the BLENDER_VERSION constant and sets the resultant array
- * with the version parts.  
- * see BLO_setversionnumber(char[],int).
- */
-void BLO_setcurrentversionnumber(char array[4])
-{
-	BLO_setversionnumber(array, BLENDER_VERSION);
-}
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
 /* Runtime reading */
 
-static int handle_read_msb_int(int handle) {
+static int handle_read_msb_int(int handle)
+{
 	unsigned char buf[4];
 
-	if (read(handle, buf, 4)!=4)
+	if(read(handle, buf, 4) != 4)
 		return -1;
-	else
-		return (buf[0]<<24) + (buf[1]<<16) + (buf[2]<<8) + (buf[3]<<0);
+
+	return (buf[0]<<24) + (buf[1]<<16) + (buf[2]<<8) + (buf[3]<<0);
 }
 
-int blo_is_a_runtime(char *path) {
+int BLO_is_a_runtime(char *path)
+{
 	int res= 0, fd= open(path, O_BINARY|O_RDONLY, 0);
 	int datastart;
 	char buf[8];
 
-	if (fd==-1)
+	if(fd==-1)
 		goto cleanup;
 	
 	lseek(fd, -12, SEEK_END);
 	
 	datastart= handle_read_msb_int(fd);
-	if (datastart==-1)
+
+	if(datastart==-1)
 		goto cleanup;
-	else if (read(fd, buf, 8)!=8)
+	else if(read(fd, buf, 8)!=8)
 		goto cleanup;
-	else if (memcmp(buf, "BRUNTIME", 8)!=0)
+	else if(memcmp(buf, "BRUNTIME", 8)!=0)
 		goto cleanup;
 	else
 		res= 1;
 
 cleanup:
-	if (fd!=-1)
+	if(fd!=-1)
 		close(fd);
 
 	return res;	
 }
 
-BlendFileData *
-blo_read_runtime(
-	char *path, 
-	ReportList *reports)
+BlendFileData *BLO_read_runtime(char *path, ReportList *reports)
 {
 	BlendFileData *bfd= NULL;
 	size_t actualsize;
@@ -137,7 +105,8 @@ blo_read_runtime(
 	char buf[8];
 
 	fd= open(path, O_BINARY|O_RDONLY, 0);
-	if (fd==-1) {
+
+	if(fd==-1) {
 		BKE_reportf(reports, RPT_ERROR, "Unable to open \"%s\": %s.", path, strerror(errno));
 		goto cleanup;
 	}
@@ -147,16 +116,20 @@ blo_read_runtime(
 	lseek(fd, -12, SEEK_END);
 
 	datastart= handle_read_msb_int(fd);
-	if (datastart==-1) {
+
+	if(datastart==-1) {
 		BKE_reportf(reports, RPT_ERROR, "Unable to read  \"%s\" (problem seeking)", path);
 		goto cleanup;
-	} else if (read(fd, buf, 8)!=8) {
+	}
+	else if(read(fd, buf, 8)!=8) {
 		BKE_reportf(reports, RPT_ERROR, "Unable to read  \"%s\" (truncated header)", path);
 		goto cleanup;
-	} else if (memcmp(buf, "BRUNTIME", 8)!=0) {
+	}
+	else if(memcmp(buf, "BRUNTIME", 8)!=0) {
 		BKE_reportf(reports, RPT_ERROR, "Unable to read  \"%s\" (not a blend file)", path);
 		goto cleanup;
-	} else {	
+	}
+	else {	
 		//printf("starting to read runtime from %s at datastart %d\n", path, datastart);
 		lseek(fd, datastart, SEEK_SET);
 		bfd = blo_read_blendafterruntime(fd, path, actualsize-datastart, reports);
@@ -164,7 +137,7 @@ blo_read_runtime(
 	}
 	
 cleanup:
-	if (fd!=-1)
+	if(fd!=-1)
 		close(fd);
 	
 	return bfd;
diff --git a/source/blender/readblenfile/BLO_readblenfile.h b/source/blender/readblenfile/BLO_readblenfile.h
deleted file mode 100644
index 9b4e15165f5c6f04f8b05ece776854f7f9b649b9..0000000000000000000000000000000000000000
--- a/source/blender/readblenfile/BLO_readblenfile.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- * 
- */
-
-#ifndef BLO_READBLENFILE_H
-#define BLO_READBLENFILE_H
-
-/** \file BLO_readblenfile.h
- *  \ingroup blo
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct ReportList;
-
-	BlendFileData *
-BLO_readblenfilename(
-	char *fileName, 
-	struct ReportList *reports);
-
-	BlendFileData *
-BLO_readblenfilehandle(
-	int fileHandle, 
-	struct ReportList *reports);
-
-	BlendFileData *
-BLO_readblenfilememory(
-	char *fromBuffer,
-	int fromBufferSize, 
-	struct ReportList *reports);
-
-
-	void
-BLO_setcurrentversionnumber(
-	char array[4]);
-
-	void
-BLO_setversionnumber(
-	char array[4],
-	int version);
-
-	int
-blo_is_a_runtime(
-	char *file);
-
-	BlendFileData *
-blo_read_runtime(
-	char *file, 
-	struct ReportList *reports);
-
-#define BLO_RESERVEDSIZE 12
-extern const char *headerMagic;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BLO_READBLENFILE_H */
-
diff --git a/source/blender/readblenfile/CMakeLists.txt b/source/blender/readblenfile/CMakeLists.txt
deleted file mode 100644
index 9b869d39697d119182cb928f36b774394124e461..0000000000000000000000000000000000000000
--- a/source/blender/readblenfile/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-# $Id$
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2006, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-set(INC 
-	.
-	../blenloader
-	../blenloader/intern
-	../blenkernel
-	../blenlib
-	../makesdna
-)
-
-set(SRC
-	intern/BLO_readblenfile.c
-
-	BLO_readblenfile.h
-)
-
-blender_add_lib(bf_readblenfile "${SRC}" "${INC}")
diff --git a/source/blender/readblenfile/SConscript b/source/blender/readblenfile/SConscript
deleted file mode 100644
index 07f84eb52d5deeb21ae6aee6a42fb329c17f443b..0000000000000000000000000000000000000000
--- a/source/blender/readblenfile/SConscript
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-
-sources = env.Glob('intern/*.c')
-
-incs = '.  ../blenloader ../blenloader/intern ../blenkernel ../blenlib ../makesdna'
-
-env.BlenderLib ( 'bf_readblenfile', sources, Split(incs), [], libtype=['core','player'], priority = [0,5] )
diff --git a/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c b/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c
deleted file mode 100644
index 0f3541b510dc0111466546a8b7db31ef751944e7..0000000000000000000000000000000000000000
--- a/source/blender/readblenfile/stub/BLO_readblenfileSTUB.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- *
- */
-
-/** \file blender/readblenfile/stub/BLO_readblenfileSTUB.c
- *  \ingroup blo
- */
-
-
-#include <stdio.h>
-
-int BLO_readblenfilememory( char *fromBuffer, int fromBufferSize);
-int BLO_readblenfilename( char *fileName);
-int BLO_readblenfilehandle( int fileHandle);
-int BLO_is_a_runtime( char *file);
-int BLO_read_runtime( char *file);
-
-	int
-BLO_readblenfilememory(
-	char *fromBuffer, int fromBufferSize)
-{
-#if defined(DEBUG)
-	fprintf(stderr,
-			"Error BLO_readblenfilename is a stub\n");
-#endif
-	return(1);
-}
-
-	int
-BLO_readblenfilename(
-	char *fileName)
-{
-#if defined(DEBUG)
-	fprintf(stderr,
-			"Error BLO_readblenfilename is a stub\n");
-#endif
-	return(1);
-}
-
-	int
-BLO_readblenfilehandle(
-	int fileHandle)
-{
-#if defined(DEBUG)
-	fprintf(stderr,
-			"Error BLO_readblenfilehandle is a stub\n");
-#endif
-	return(1);
-}
-
-	int
-BLO_is_a_runtime(
-	char *file)
-{
-#if defined(DEBUG)
-	fprintf(stderr,
-			"Error BLO_is_a_runtime is a stub\n");
-#endif
-	return 0;
-}
-
-	int
-BLO_read_runtime(
-	char *file) 
-{
-#if defined(DEBUG)
-	fprintf(stderr,
-			"Error BLO_read_runtime is a stub\n");
-#endif
-	return 0;
-}
diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt
index b88c0fd04c1a2d7652ce1383021ea6f5b80e8a8b..901aaea3eca7037dd6f350dd10f576793c53952d 100644
--- a/source/blenderplayer/CMakeLists.txt
+++ b/source/blenderplayer/CMakeLists.txt
@@ -127,7 +127,6 @@ endif()
 		extern_openjpeg
 		extern_redcode
 		bf_imbuf_dds
-		bf_readblenfile 
 		bf_dna
 		ge_videotex
 		bf_blenfont
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index d3df5e094c3551decd8d215133aaafcc21c1de2c..d592b432070bfdb136e0331ee24e1f24b2be3bba 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -771,7 +771,6 @@ endif()
 		bf_imbuf_cineon
 		bf_imbuf_openexr
 		bf_imbuf_dds
-		bf_readblenfile
 		bf_collada
 		bf_intern_bsp
 		bf_intern_bop
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
index edf0839f74786ef36b9792d56b3d53c7a2c0d197..389300efc2137efdf73b4a4b90fa9f70b3c7bac7 100644
--- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
@@ -39,7 +39,6 @@ set(INC
 	../../../../source/blender/blenfont
 	../../../../source/blender/blenlib
 	../../../../source/blender/blenkernel
-	../../../../source/blender/readblenfile
 	../../../../source/blender
 	../../../../source/blender/makesdna
 	../../../../source/blender/makesrna
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index a4f1391b1b0bae61d8648d36ec100eb901c7ffec..832cd8b0651e92507d6781a01adf82225b348a9c 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -67,7 +67,7 @@ extern "C"
 #include "DNA_scene_types.h"
 #include "DNA_userdef_types.h"
 #include "BLO_readfile.h"
-#include "BLO_readblenfile.h"
+#include "BLO_runtime.h"
 #include "IMB_imbuf.h"
 #include "BKE_text.h"
 	
@@ -313,8 +313,8 @@ static BlendFileData *load_game_data(char *progname, char *filename = NULL, char
 	BKE_reports_init(&reports, RPT_STORE);
 	
 	/* try to load ourself, will only work if we are a runtime */
-	if (blo_is_a_runtime(progname)) {
-		bfd= blo_read_runtime(progname, &reports);
+	if (BLO_is_a_runtime(progname)) {
+		bfd= BLO_read_runtime(progname, &reports);
 		if (bfd) {
 			bfd->type= BLENFILETYPE_RUNTIME;
 			strcpy(bfd->main->name, progname);
@@ -444,7 +444,7 @@ int main(int argc, char** argv)
 	U.audiochannels = 2;
 
 	/* if running blenderplayer the last argument can't be parsed since it has to be the filename. */
-	isBlenderPlayer = !blo_is_a_runtime(argv[0]);
+	isBlenderPlayer = !BLO_is_a_runtime(argv[0]);
 	if (isBlenderPlayer)
 		validArguments = argc - 1;
 	else
diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript
index 65bd55f95d7ddf2152ce443bfceb31fadd311880..e3ffc1a406b2b9c1295a7deb80ea62e16c6174c9 100644
--- a/source/gameengine/GamePlayer/ghost/SConscript
+++ b/source/gameengine/GamePlayer/ghost/SConscript
@@ -22,7 +22,6 @@ incs = ['.',
         '#source/blender/blenfont',
         '#source/blender/blenlib',
         '#source/blender/blenkernel',
-        '#source/blender/readblenfile',
         '#source/blender',
         '#source/blender/include',
         '#source/blender/makesdna',