diff --git a/data.cpp b/data.cpp
index fbdf6d2..1ea7b84 100644
--- a/data.cpp
+++ b/data.cpp
@@ -1,5 +1,5 @@
 /*
-	Copyright 2012 bigbiff/Dees_Troy TeamWin
+	Copyright 2012 to 2016 bigbiff/Dees_Troy TeamWin
 	This file is part of TWRP/TeamWin Recovery Project.
 
 	TWRP is free software: you can redistribute it and/or modify
@@ -16,29 +16,12 @@
 	along with TWRP.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <linux/input.h>
 #include <pthread.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
 #include <time.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #include <string>
-#include <utility>
-#include <map>
-#include <fstream>
 #include <sstream>
-#include <pthread.h>
+#include <cctype>
+#include <cutils/properties.h>
 
 #include "variables.h"
 #include "data.hpp"
@@ -49,8 +32,8 @@
 #endif
 #include "find_file.hpp"
 #include "set_metadata.h"
-#include <cutils/properties.h>
 #include "gui/gui.hpp"
+#include "infomanager.hpp"
 
 #define DEVID_MAX 64
 #define HWID_MAX 32
@@ -63,14 +46,15 @@
 }
 #include "minuitwrp/minui.h"
 
-#define FILE_VERSION 0x00010010
+#define FILE_VERSION 0x00010010 // Do not set to 0
 
 using namespace std;
 
-map<string, DataManager::TStrIntPair>   DataManager::mValues;
-map<string, string>                     DataManager::mConstValues;
 string                                  DataManager::mBackingFile;
 int                                     DataManager::mInitialized = 0;
+InfoManager                             DataManager::mPersist;  // Data that that is not constant and will be saved to the settings file
+InfoManager                             DataManager::mData;     // Data that is not constant and will not be saved to settings file
+InfoManager                             DataManager::mConst;    // Data that is constant and will not be saved to settings file
 
 extern bool datamedia;
 
@@ -154,7 +138,7 @@
 			snprintf(device_id, DEVID_MAX, "%s_%s", model_id, hardware_id);
 
 		sanitize_device_id(device_id);
-		mConstValues.insert(make_pair("device_id", device_id));
+		mConst.SetValue("device_id", device_id);
 		LOGINFO("=> using device id: '%s'\n", device_id);
 		return;
 	}
@@ -173,7 +157,7 @@
 				token += CMDLINE_SERIALNO_LEN;
 				snprintf(device_id, DEVID_MAX, "%s", token);
 				sanitize_device_id(device_id); // also removes newlines
-				mConstValues.insert(make_pair("device_id", device_id));
+				mConst.SetValue("device_id", device_id);
 				return;
 			}
 			token = strtok(NULL, " ");
@@ -195,7 +179,7 @@
 					snprintf(device_id, DEVID_MAX, "%s", token);
 					sanitize_device_id(device_id); // also removes newlines
 					LOGINFO("=> serial from cpuinfo: '%s'\n", device_id);
-					mConstValues.insert(make_pair("device_id", device_id));
+					mConst.SetValue("device_id", device_id);
 					fclose(fp);
 					return;
 				}
@@ -221,28 +205,29 @@
 		LOGINFO("\nusing hardware id for device id: '%s'\n", hardware_id);
 		snprintf(device_id, DEVID_MAX, "%s", hardware_id);
 		sanitize_device_id(device_id);
-		mConstValues.insert(make_pair("device_id", device_id));
+		mConst.SetValue("device_id", device_id);
 		return;
 	}
 
 	strcpy(device_id, "serialno");
 	LOGINFO("=> device id not found, using '%s'\n", device_id);
-	mConstValues.insert(make_pair("device_id", device_id));
+	mConst.SetValue("device_id", device_id);
 	return;
 }
 
 int DataManager::ResetDefaults()
 {
 	pthread_mutex_lock(&m_valuesLock);
-	mValues.clear();
+	mPersist.Clear();
+	mData.Clear();
+	mConst.Clear();
 	pthread_mutex_unlock(&m_valuesLock);
 
-	mConstValues.clear();
 	SetDefaultValues();
 	return 0;
 }
 
-int DataManager::LoadValues(const string filename)
+int DataManager::LoadValues(const string& filename)
 {
 	string str, dev_id;
 
@@ -252,61 +237,18 @@
 	GetValue("device_id", dev_id);
 	// Save off the backing file for set operations
 	mBackingFile = filename;
+	mPersist.SetFile(filename);
+	mPersist.SetFileVersion(FILE_VERSION);
 
 	// Read in the file, if possible
-	FILE* in = fopen(filename.c_str(), "rb");
-	if (!in) {
-		LOGINFO("Settings file '%s' not found.\n", filename.c_str());
-		return 0;
-	} else {
-		LOGINFO("Loading settings from '%s'.\n", filename.c_str());
-	}
-
-	int file_version;
-	if (fread(&file_version, 1, sizeof(int), in) != sizeof(int))	goto error;
-	if (file_version != FILE_VERSION)								goto error;
-
-	while (!feof(in))
-	{
-		string Name;
-		string Value;
-		unsigned short length;
-		char array[513];
-
-		if (fread(&length, 1, sizeof(unsigned short), in) != sizeof(unsigned short))	goto error;
-		if (length >= 512)																goto error;
-		if (fread(array, 1, length, in) != length)										goto error;
-		array[length+1] = '\0';
-		Name = array;
-
-		if (fread(&length, 1, sizeof(unsigned short), in) != sizeof(unsigned short))	goto error;
-		if (length >= 512)																goto error;
-		if (fread(array, 1, length, in) != length)										goto error;
-		array[length+1] = '\0';
-		Value = array;
-
-		map<string, TStrIntPair>::iterator pos;
-
-		pthread_mutex_lock(&m_valuesLock);
-
-		pos = mValues.find(Name);
-		if (pos != mValues.end())
-		{
-			pos->second.first = Value;
-			pos->second.second = 1;
-		}
-		else
-			mValues.insert(TNameValuePair(Name, TStrIntPair(Value, 1)));
-
-		pthread_mutex_unlock(&m_valuesLock);
+	pthread_mutex_lock(&m_valuesLock);
+	mPersist.LoadValues();
 
 #ifndef TW_NO_SCREEN_TIMEOUT
-		if (Name == "tw_screen_timeout_secs")
-			blankTimer.setTime(atoi(Value.c_str()));
+	blankTimer.setTime(mPersist.GetIntValue("tw_screen_timeout_secs"));
 #endif
-	}
-error:
-	fclose(in);
+
+	pthread_mutex_unlock(&m_valuesLock);
 	string current = GetCurrentStoragePath();
 	TWPartition* Part = PartitionManager.Find_Partition_By_Path(current);
 	if(!Part)
@@ -334,41 +276,22 @@
 	string mount_path = GetSettingsStoragePath();
 	PartitionManager.Mount_By_Path(mount_path.c_str(), 1);
 
-	FILE* out = fopen(mBackingFile.c_str(), "wb");
-	if (!out)
-		return -1;
-
-	int file_version = FILE_VERSION;
-	fwrite(&file_version, 1, sizeof(int), out);
-
+	mPersist.SetFile(mBackingFile);
+	mPersist.SetFileVersion(FILE_VERSION);
 	pthread_mutex_lock(&m_valuesLock);
-
-	map<string, TStrIntPair>::iterator iter;
-	for (iter = mValues.begin(); iter != mValues.end(); ++iter)
-	{
-		// Save only the persisted data
-		if (iter->second.second != 0)
-		{
-			unsigned short length = (unsigned short) iter->first.length() + 1;
-			fwrite(&length, 1, sizeof(unsigned short), out);
-			fwrite(iter->first.c_str(), 1, length, out);
-			length = (unsigned short) iter->second.first.length() + 1;
-			fwrite(&length, 1, sizeof(unsigned short), out);
-			fwrite(iter->second.first.c_str(), 1, length, out);
-		}
-	}
-
+	mPersist.SaveValues();
 	pthread_mutex_unlock(&m_valuesLock);
 
-	fclose(out);
 	tw_set_default_metadata(mBackingFile.c_str());
+	LOGINFO("Saved settings file values\n");
 #endif // ifdef TW_OEM_BUILD
 	return 0;
 }
 
-int DataManager::GetValue(const string varName, string& value)
+int DataManager::GetValue(const string& varName, string& value)
 {
 	string localStr = varName;
+	int ret = 0;
 
 	if (!mInitialized)
 		SetDefaultValues();
@@ -392,28 +315,22 @@
 		return 0;
 	}
 
-	map<string, string>::iterator constPos;
-	constPos = mConstValues.find(localStr);
-	if (constPos != mConstValues.end())
-	{
-		value = constPos->second;
-		return 0;
-	}
-
 	pthread_mutex_lock(&m_valuesLock);
-	map<string, TStrIntPair>::iterator pos;
-	pos = mValues.find(localStr);
-	if (pos == mValues.end()){
-		pthread_mutex_unlock(&m_valuesLock);
-		return -1;
-	}
+	ret = mConst.GetValue(localStr, value);
+	if (ret == 0)
+		goto exit;
 
-	value = pos->second.first;
+	ret = mPersist.GetValue(localStr, value);
+	if (ret == 0)
+		goto exit;
+
+	ret = mData.GetValue(localStr, value);
+exit:
 	pthread_mutex_unlock(&m_valuesLock);
-	return 0;
+	return ret;
 }
 
-int DataManager::GetValue(const string varName, int& value)
+int DataManager::GetValue(const string& varName, int& value)
 {
 	string data;
 
@@ -424,7 +341,7 @@
 	return 0;
 }
 
-int DataManager::GetValue(const string varName, float& value)
+int DataManager::GetValue(const string& varName, float& value)
 {
 	string data;
 
@@ -435,7 +352,7 @@
 	return 0;
 }
 
-unsigned long long DataManager::GetValue(const string varName, unsigned long long& value)
+unsigned long long DataManager::GetValue(const string& varName, unsigned long long& value)
 {
 	string data;
 
@@ -447,7 +364,7 @@
 }
 
 // This function will return an empty string if the value doesn't exist
-string DataManager::GetStrValue(const string varName)
+string DataManager::GetStrValue(const string& varName)
 {
 	string retVal;
 
@@ -456,7 +373,7 @@
 }
 
 // This function will return 0 if the value doesn't exist
-int DataManager::GetIntValue(const string varName)
+int DataManager::GetIntValue(const string& varName)
 {
 	string retVal;
 
@@ -464,7 +381,7 @@
 	return atoi(retVal.c_str());
 }
 
-int DataManager::SetValue(const string varName, string value, int persist /* = 0 */)
+int DataManager::SetValue(const string& varName, const string& value, const int persist /* = 0 */)
 {
 	if (!mInitialized)
 		SetDefaultValues();
@@ -481,22 +398,24 @@
 	if (varName.empty() || (varName[0] >= '0' && varName[0] <= '9'))
 		return -1;
 
-	map<string, string>::iterator constChk;
-	constChk = mConstValues.find(varName);
-	if (constChk != mConstValues.end())
-		return -1;
-
+	string test;
 	pthread_mutex_lock(&m_valuesLock);
+	int constChk = mConst.GetValue(varName, test);
+	if (constChk == 0) {
+		pthread_mutex_unlock(&m_valuesLock);
+		return -1;
+	}
 
-	map<string, TStrIntPair>::iterator pos;
-	pos = mValues.find(varName);
-	if (pos == mValues.end())
-		pos = (mValues.insert(TNameValuePair(varName, TStrIntPair(value, persist)))).first;
-	else
-		pos->second.first = value;
-
-	if (pos->second.second != 0)
-		SaveValues();
+	if (persist) {
+		mPersist.SetValue(varName, value);
+	} else {
+		int persistChk = mPersist.GetValue(varName, test);
+		if (persistChk == 0) {
+			mPersist.SetValue(varName, value);
+		} else {
+			mData.SetValue(varName, value);
+		}
+	}
 
 	pthread_mutex_unlock(&m_valuesLock);
 
@@ -512,42 +431,32 @@
 	return 0;
 }
 
-int DataManager::SetValue(const string varName, int value, int persist /* = 0 */)
+int DataManager::SetValue(const string& varName, const int value, const int persist /* = 0 */)
 {
 	ostringstream valStr;
 	valStr << value;
-	if (varName == "tw_use_external_storage") {
-		string str;
-
-		if (GetIntValue(TW_HAS_INTERNAL) == 1)
-			str = GetStrValue(TW_INTERNAL_PATH);
-		else
-			str = GetStrValue(TW_EXTERNAL_PATH);
-
-		SetValue("tw_storage_path", str);
-	}
 	return SetValue(varName, valStr.str(), persist);
 }
 
-int DataManager::SetValue(const string varName, float value, int persist /* = 0 */)
+int DataManager::SetValue(const string& varName, const float value, const int persist /* = 0 */)
 {
 	ostringstream valStr;
 	valStr << value;
 	return SetValue(varName, valStr.str(), persist);;
 }
 
-int DataManager::SetValue(const string varName, unsigned long long value, int persist /* = 0 */)
+int DataManager::SetValue(const string& varName, const unsigned long long& value, const int persist /* = 0 */)
 {
 	ostringstream valStr;
 	valStr << value;
 	return SetValue(varName, valStr.str(), persist);
 }
 
-int DataManager::SetProgress(float Fraction) {
+int DataManager::SetProgress(const float Fraction) {
 	return SetValue("ui_progress", (float) (Fraction * 100.0));
 }
 
-int DataManager::ShowProgress(float Portion, float Seconds)
+int DataManager::ShowProgress(const float Portion, const float Seconds)
 {
 	float Starting_Portion;
 	GetValue("ui_progress_portion", Starting_Portion);
@@ -558,16 +467,6 @@
 	return 0;
 }
 
-void DataManager::DumpValues()
-{
-	map<string, TStrIntPair>::iterator iter;
-	gui_print("Data Manager dump - Values with leading X are persisted.\n");
-	pthread_mutex_lock(&m_valuesLock);
-	for (iter = mValues.begin(); iter != mValues.end(); ++iter)
-		gui_print("%c %s=%s\n", iter->second.second ? 'X' : ' ', iter->first.c_str(), iter->second.first.c_str());
-	pthread_mutex_unlock(&m_valuesLock);
-}
-
 void DataManager::update_tz_environment_variables(void)
 {
 	setenv("TZ", GetStrValue(TW_TIME_ZONE_VAR).c_str(), 1);
@@ -618,25 +517,27 @@
 {
 	string str, path;
 
+	mConst.SetConst();
+
 	get_device_id();
 
 	pthread_mutex_lock(&m_valuesLock);
 
 	mInitialized = 1;
 
-	mConstValues.insert(make_pair("true", "1"));
-	mConstValues.insert(make_pair("false", "0"));
+	mConst.SetValue("true", "1");
+	mConst.SetValue("false", "0");
 
-	mConstValues.insert(make_pair(TW_VERSION_VAR, TW_VERSION_STR));
-	mValues.insert(make_pair("tw_button_vibrate", make_pair("80", 1)));
-	mValues.insert(make_pair("tw_keyboard_vibrate", make_pair("40", 1)));
-	mValues.insert(make_pair("tw_action_vibrate", make_pair("160", 1)));
+	mConst.SetValue(TW_VERSION_VAR, TW_VERSION_STR);
+	mPersist.SetValue("tw_button_vibrate", "80");
+	mPersist.SetValue("tw_keyboard_vibrate", "40");
+	mPersist.SetValue("tw_action_vibrate", "160");
 
 	TWPartition *store = PartitionManager.Get_Default_Storage_Partition();
 	if(store)
-		mValues.insert(make_pair("tw_storage_path", make_pair(store->Storage_Path.c_str(), 1)));
+		mPersist.SetValue("tw_storage_path", store->Storage_Path);
 	else
-		mValues.insert(make_pair("tw_storage_path", make_pair("/", 1)));
+		mPersist.SetValue("tw_storage_path", "/");
 
 #ifdef TW_FORCE_CPUINFO_FOR_DEVICE_ID
 	printf("TW_FORCE_CPUINFO_FOR_DEVICE_ID := true\n");
@@ -644,60 +545,58 @@
 
 #ifdef BOARD_HAS_NO_REAL_SDCARD
 	printf("BOARD_HAS_NO_REAL_SDCARD := true\n");
-	mConstValues.insert(make_pair(TW_ALLOW_PARTITION_SDCARD, "0"));
+	mConst.SetValue(TW_ALLOW_PARTITION_SDCARD, "0");
 #else
-	mConstValues.insert(make_pair(TW_ALLOW_PARTITION_SDCARD, "1"));
+	mConst.SetValue(TW_ALLOW_PARTITION_SDCARD, "1");
 #endif
 
 #ifdef TW_INCLUDE_DUMLOCK
 	printf("TW_INCLUDE_DUMLOCK := true\n");
-	mConstValues.insert(make_pair(TW_SHOW_DUMLOCK, "1"));
+	mConst.SetValue(TW_SHOW_DUMLOCK, "1");
 #else
-	mConstValues.insert(make_pair(TW_SHOW_DUMLOCK, "0"));
+	mConst.SetValue(TW_SHOW_DUMLOCK, "0");
 #endif
 
 	str = GetCurrentStoragePath();
-	SetValue(TW_ZIP_LOCATION_VAR, str.c_str(), 1);
+	mPersist.SetValue(TW_ZIP_LOCATION_VAR, str);
 	str += "/TWRP/BACKUPS/";
 
 	string dev_id;
-	GetValue("device_id", dev_id);
+	mConst.GetValue("device_id", dev_id);
 
 	str += dev_id;
-	SetValue(TW_BACKUPS_FOLDER_VAR, str, 0);
+	mData.SetValue(TW_BACKUPS_FOLDER_VAR, str);
 
-	mConstValues.insert(make_pair(TW_REBOOT_SYSTEM, "1"));
+	mConst.SetValue(TW_REBOOT_SYSTEM, "1");
 #ifdef TW_NO_REBOOT_RECOVERY
 	printf("TW_NO_REBOOT_RECOVERY := true\n");
-	mConstValues.insert(make_pair(TW_REBOOT_RECOVERY, "0"));
+	mConst.SetValue(TW_REBOOT_RECOVERY, "0");
 #else
-	mConstValues.insert(make_pair(TW_REBOOT_RECOVERY, "1"));
+	mConst.SetValue(TW_REBOOT_RECOVERY, "1");
 #endif
-	mConstValues.insert(make_pair(TW_REBOOT_POWEROFF, "1"));
+	mConst.SetValue(TW_REBOOT_POWEROFF, "1");
 #ifdef TW_NO_REBOOT_BOOTLOADER
 	printf("TW_NO_REBOOT_BOOTLOADER := true\n");
-	mConstValues.insert(make_pair(TW_REBOOT_BOOTLOADER, "0"));
+	mConst.SetValue(TW_REBOOT_BOOTLOADER, "0");
 #else
-	mConstValues.insert(make_pair(TW_REBOOT_BOOTLOADER, "1"));
+	mConst.SetValue(TW_REBOOT_BOOTLOADER, "1");
 #endif
 #ifdef RECOVERY_SDCARD_ON_DATA
 	printf("RECOVERY_SDCARD_ON_DATA := true\n");
-	mConstValues.insert(make_pair(TW_HAS_DATA_MEDIA, "1"));
-	mConstValues.insert(make_pair("tw_has_internal", "1"));
+	mConst.SetValue(TW_HAS_DATA_MEDIA, "1");
 	datamedia = true;
 #else
-	mValues.insert(make_pair(TW_HAS_DATA_MEDIA, make_pair("0", 0)));
-	mValues.insert(make_pair("tw_has_internal", make_pair("0", 0)));
+	mData.SetValue(TW_HAS_DATA_MEDIA, "0");
 #endif
 #ifdef TW_NO_BATT_PERCENT
 	printf("TW_NO_BATT_PERCENT := true\n");
-	mConstValues.insert(make_pair(TW_NO_BATTERY_PERCENT, "1"));
+	mConst.SetValue(TW_NO_BATTERY_PERCENT, "1");
 #else
-	mConstValues.insert(make_pair(TW_NO_BATTERY_PERCENT, "0"));
+	mConst.SetValue(TW_NO_BATTERY_PERCENT, "0");
 #endif
 #ifdef TW_NO_CPU_TEMP
 	printf("TW_NO_CPU_TEMP := true\n");
-	mConstValues.insert(make_pair("tw_no_cpu_temp", "1"));
+	mConst.SetValue("tw_no_cpu_temp", "1");
 #else
 	string cpu_temp_file;
 #ifdef TW_CUSTOM_CPU_TEMP_PATH
@@ -706,31 +605,31 @@
 	cpu_temp_file = "/sys/class/thermal/thermal_zone0/temp";
 #endif
 	if (TWFunc::Path_Exists(cpu_temp_file)) {
-		mConstValues.insert(make_pair("tw_no_cpu_temp", "0"));
+		mConst.SetValue("tw_no_cpu_temp", "0");
 	} else {
 		LOGINFO("CPU temperature file '%s' not found, disabling CPU temp.\n", cpu_temp_file.c_str());
-		mConstValues.insert(make_pair("tw_no_cpu_temp", "1"));
+		mConst.SetValue("tw_no_cpu_temp", "1");
 	}
 #endif
 #ifdef TW_CUSTOM_POWER_BUTTON
 	printf("TW_POWER_BUTTON := %s\n", EXPAND(TW_CUSTOM_POWER_BUTTON));
-	mConstValues.insert(make_pair(TW_POWER_BUTTON, EXPAND(TW_CUSTOM_POWER_BUTTON)));
+	mConst.SetValue(TW_POWER_BUTTON, EXPAND(TW_CUSTOM_POWER_BUTTON));
 #else
-	mConstValues.insert(make_pair(TW_POWER_BUTTON, "0"));
+	mConst.SetValue(TW_POWER_BUTTON, "0");
 #endif
 #ifdef TW_ALWAYS_RMRF
 	printf("TW_ALWAYS_RMRF := true\n");
-	mConstValues.insert(make_pair(TW_RM_RF_VAR, "1"));
+	mConst.SetValue(TW_RM_RF_VAR, "1");
 #endif
 #ifdef TW_NEVER_UNMOUNT_SYSTEM
 	printf("TW_NEVER_UNMOUNT_SYSTEM := true\n");
-	mConstValues.insert(make_pair(TW_DONT_UNMOUNT_SYSTEM, "1"));
+	mConst.SetValue(TW_DONT_UNMOUNT_SYSTEM, "1");
 #else
-	mConstValues.insert(make_pair(TW_DONT_UNMOUNT_SYSTEM, "0"));
+	mConst.SetValue(TW_DONT_UNMOUNT_SYSTEM, "0");
 #endif
 #ifdef TW_NO_USB_STORAGE
 	printf("TW_NO_USB_STORAGE := true\n");
-	mConstValues.insert(make_pair(TW_HAS_USB_STORAGE, "0"));
+	mConst.SetValue(TW_HAS_USB_STORAGE, "0");
 #else
 	char lun_file[255];
 	string Lun_File_str = CUSTOM_LUN_FILE;
@@ -741,86 +640,83 @@
 	}
 	if (!TWFunc::Path_Exists(Lun_File_str)) {
 		LOGINFO("Lun file '%s' does not exist, USB storage mode disabled\n", Lun_File_str.c_str());
-		mConstValues.insert(make_pair(TW_HAS_USB_STORAGE, "0"));
+		mConst.SetValue(TW_HAS_USB_STORAGE, "0");
 	} else {
 		LOGINFO("Lun file '%s'\n", Lun_File_str.c_str());
-		mValues.insert(make_pair(TW_HAS_USB_STORAGE, make_pair("1", 0)));
+		mData.SetValue(TW_HAS_USB_STORAGE, "1");
 	}
 #endif
 #ifdef TW_INCLUDE_INJECTTWRP
 	printf("TW_INCLUDE_INJECTTWRP := true\n");
-	mConstValues.insert(make_pair(TW_HAS_INJECTTWRP, "1"));
-	mValues.insert(make_pair(TW_INJECT_AFTER_ZIP, make_pair("1", 1)));
+	mConst.SetValue(TW_HAS_INJECTTWRP, "1");
+	mPersist(TW_INJECT_AFTER_ZIP, "1");
 #else
-	mConstValues.insert(make_pair(TW_HAS_INJECTTWRP, "0"));
-	mValues.insert(make_pair(TW_INJECT_AFTER_ZIP, make_pair("0", 1)));
+	mConst.SetValue(TW_HAS_INJECTTWRP, "0");
 #endif
 #ifdef TW_HAS_DOWNLOAD_MODE
 	printf("TW_HAS_DOWNLOAD_MODE := true\n");
-	mConstValues.insert(make_pair(TW_DOWNLOAD_MODE, "1"));
+	mConst.SetValue(TW_DOWNLOAD_MODE, "1");
 #endif
 #ifdef TW_INCLUDE_CRYPTO
-	mConstValues.insert(make_pair(TW_HAS_CRYPTO, "1"));
+	mConst.SetValue(TW_HAS_CRYPTO, "1");
 	printf("TW_INCLUDE_CRYPTO := true\n");
 #endif
 #ifdef TW_SDEXT_NO_EXT4
 	printf("TW_SDEXT_NO_EXT4 := true\n");
-	mConstValues.insert(make_pair(TW_SDEXT_DISABLE_EXT4, "1"));
+	mConst.SetValue(TW_SDEXT_DISABLE_EXT4, "1");
 #else
-	mConstValues.insert(make_pair(TW_SDEXT_DISABLE_EXT4, "0"));
+	mConst.SetValue(TW_SDEXT_DISABLE_EXT4, "0");
 #endif
 
 #ifdef TW_HAS_NO_BOOT_PARTITION
-	mValues.insert(make_pair("tw_backup_list", make_pair("/system;/data;", 1)));
+	mPersist.SetValue("tw_backup_list", "/system;/data;");
 #else
-	mValues.insert(make_pair("tw_backup_list", make_pair("/system;/data;/boot;", 1)));
+	mPersist.SetValue("tw_backup_list", "/system;/data;/boot;");
 #endif
-	mConstValues.insert(make_pair(TW_MIN_SYSTEM_VAR, TW_MIN_SYSTEM_SIZE));
-	mValues.insert(make_pair(TW_BACKUP_NAME, make_pair("(Auto Generate)", 0)));
+	mConst.SetValue(TW_MIN_SYSTEM_VAR, TW_MIN_SYSTEM_SIZE);
+	mData.SetValue(TW_BACKUP_NAME, "(Auto Generate)");
 
-	mValues.insert(make_pair(TW_REBOOT_AFTER_FLASH_VAR, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_SIGNED_ZIP_VERIFY_VAR, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_FORCE_MD5_CHECK_VAR, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_COLOR_THEME_VAR, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_USE_COMPRESSION_VAR, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_SHOW_SPAM_VAR, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_TIME_ZONE_VAR, make_pair("CST6CDT,M3.2.0,M11.1.0", 1)));
-	mValues.insert(make_pair(TW_SORT_FILES_BY_DATE_VAR, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_GUI_SORT_ORDER, make_pair("1", 1)));
-	mValues.insert(make_pair(TW_RM_RF_VAR, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_SKIP_MD5_CHECK_VAR, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_SKIP_MD5_GENERATE_VAR, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_SDEXT_SIZE, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_SWAP_SIZE, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_SDPART_FILE_SYSTEM, make_pair("ext3", 1)));
-	mValues.insert(make_pair(TW_TIME_ZONE_GUISEL, make_pair("CST6;CDT,M3.2.0,M11.1.0", 1)));
-	mValues.insert(make_pair(TW_TIME_ZONE_GUIOFFSET, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_TIME_ZONE_GUIDST, make_pair("1", 1)));
-	mValues.insert(make_pair(TW_ACTION_BUSY, make_pair("0", 0)));
-	mValues.insert(make_pair("tw_wipe_cache", make_pair("0", 0)));
-	mValues.insert(make_pair("tw_wipe_dalvik", make_pair("0", 0)));
-	mValues.insert(make_pair(TW_ZIP_INDEX, make_pair("0", 0)));
-	mValues.insert(make_pair(TW_ZIP_QUEUE_COUNT, make_pair("0", 0)));
-	mValues.insert(make_pair(TW_FILENAME, make_pair("/sdcard", 0)));
-	mValues.insert(make_pair(TW_SIMULATE_ACTIONS, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_SIMULATE_FAIL, make_pair("0", 1)));
-	mValues.insert(make_pair(TW_IS_ENCRYPTED, make_pair("0", 0)));
-	mValues.insert(make_pair(TW_IS_DECRYPTED, make_pair("0", 0)));
-	mValues.insert(make_pair(TW_CRYPTO_PASSWORD, make_pair("0", 0)));
-	mValues.insert(make_pair(TW_DATA_BLK_DEVICE, make_pair("0", 0)));
-	mValues.insert(make_pair("tw_terminal_state", make_pair("0", 0)));
-	mValues.insert(make_pair("tw_background_thread_running", make_pair("0", 0)));
-	mValues.insert(make_pair(TW_RESTORE_FILE_DATE, make_pair("0", 0)));
-	mValues.insert(make_pair("tw_military_time", make_pair("0", 1)));
+	mPersist.SetValue(TW_REBOOT_AFTER_FLASH_VAR, "0");
+	mPersist.SetValue(TW_SIGNED_ZIP_VERIFY_VAR, "0");
+	mPersist.SetValue(TW_FORCE_MD5_CHECK_VAR, "0");
+	mPersist.SetValue(TW_USE_COMPRESSION_VAR, "0");
+	mPersist.SetValue(TW_TIME_ZONE_VAR, "CST6CDT,M3.2.0,M11.1.0");
+	mPersist.SetValue(TW_GUI_SORT_ORDER, "1");
+	mPersist.SetValue(TW_RM_RF_VAR, "0");
+	mPersist.SetValue(TW_SKIP_MD5_CHECK_VAR, "0");
+	mPersist.SetValue(TW_SKIP_MD5_GENERATE_VAR, "0");
+	mPersist.SetValue(TW_SDEXT_SIZE, "0");
+	mPersist.SetValue(TW_SWAP_SIZE, "0");
+	mPersist.SetValue(TW_SDPART_FILE_SYSTEM, "ext3");
+	mPersist.SetValue(TW_TIME_ZONE_GUISEL, "CST6;CDT,M3.2.0,M11.1.0");
+	mPersist.SetValue(TW_TIME_ZONE_GUIOFFSET, "0");
+	mPersist.SetValue(TW_TIME_ZONE_GUIDST, "1");
+	mData.SetValue(TW_ACTION_BUSY, "0");
+	mData.SetValue("tw_wipe_cache", "0");
+	mData.SetValue("tw_wipe_dalvik", "0");
+	mData.SetValue(TW_ZIP_INDEX, "0");
+	mData.SetValue(TW_ZIP_QUEUE_COUNT, "0");
+	mData.SetValue(TW_FILENAME, "/sdcard");
+	mData.SetValue(TW_SIMULATE_ACTIONS, "0");
+	mData.SetValue(TW_SIMULATE_FAIL, "0");
+	mData.SetValue(TW_IS_ENCRYPTED, "0");
+	mData.SetValue(TW_IS_DECRYPTED, "0");
+	mData.SetValue(TW_CRYPTO_PASSWORD, "0");
+	mData.SetValue("tw_terminal_state", "0");
+	mData.SetValue("tw_background_thread_running", "0");
+	mData.SetValue(TW_RESTORE_FILE_DATE, "0");
+	mPersist.SetValue("tw_military_time", "0");
 #ifdef TW_NO_SCREEN_TIMEOUT
-	mValues.insert(make_pair("tw_screen_timeout_secs", make_pair("0", 1)));
-	mValues.insert(make_pair("tw_no_screen_timeout", make_pair("1", 1)));
+	mConst.SetValue("tw_screen_timeout_secs", "0");
+	mConst.SetValue("tw_no_screen_timeout", "1");
 #else
-	mValues.insert(make_pair("tw_screen_timeout_secs", make_pair("60", 1)));
-	mValues.insert(make_pair("tw_no_screen_timeout", make_pair("0", 1)));
+	mPersist.SetValue("tw_screen_timeout_secs", "60");
+	mPersist.SetValue("tw_no_screen_timeout", "0");
 #endif
-	mValues.insert(make_pair("tw_gui_done", make_pair("0", 0)));
-	mValues.insert(make_pair("tw_encrypt_backup", make_pair("0", 0)));
+	mData.SetValue("tw_gui_done", "0");
+	mData.SetValue("tw_encrypt_backup", "0");
+
+	// Brightness handling
 	string findbright;
 #ifdef TW_BRIGHTNESS_PATH
 	findbright = EXPAND(TW_BRIGHTNESS_PATH);
@@ -837,11 +733,11 @@
 	}
 	if (findbright.empty()) {
 		LOGINFO("Unable to locate brightness file\n");
-		mConstValues.insert(make_pair("tw_has_brightnesss_file", "0"));
+		mConst.SetValue("tw_has_brightnesss_file", "0");
 	} else {
 		LOGINFO("Found brightness file at '%s'\n", findbright.c_str());
-		mConstValues.insert(make_pair("tw_has_brightnesss_file", "1"));
-		mConstValues.insert(make_pair("tw_brightness_file", findbright));
+		mConst.SetValue("tw_has_brightnesss_file", "1");
+		mConst.SetValue("tw_brightness_file", findbright);
 		string maxBrightness;
 #ifdef TW_MAX_BRIGHTNESS
 		ostringstream maxVal;
@@ -867,14 +763,14 @@
 			maxBrightness = maxVal.str();
 		}
 #endif
-		mConstValues.insert(make_pair("tw_brightness_max", maxBrightness));
-		mValues.insert(make_pair("tw_brightness", make_pair(maxBrightness, 1)));
-		mValues.insert(make_pair("tw_brightness_pct", make_pair("100", 1)));
+		mConst.SetValue("tw_brightness_max", maxBrightness);
+		mPersist.SetValue("tw_brightness", maxBrightness);
+		mPersist.SetValue("tw_brightness_pct", "100");
 #ifdef TW_SECONDARY_BRIGHTNESS_PATH
 		string secondfindbright = EXPAND(TW_SECONDARY_BRIGHTNESS_PATH);
 		if (secondfindbright != "" && TWFunc::Path_Exists(secondfindbright)) {
 			LOGINFO("Will use a second brightness file at '%s'\n", secondfindbright.c_str());
-			mConstValues.insert(make_pair("tw_secondary_brightness_file", secondfindbright));
+			mConst.SetValue("tw_secondary_brightness_file", secondfindbright);
 		} else {
 			LOGINFO("Specified secondary brightness file '%s' not found.\n", secondfindbright.c_str());
 		}
@@ -886,46 +782,44 @@
 		int defPctInt = ( ( (double)defValInt / maxValInt ) * 100 );
 		ostringstream defPct;
 		defPct << defPctInt;
-		mValues.erase("tw_brightness_pct");
-		mValues.insert(make_pair("tw_brightness_pct", make_pair(defPct.str(), 1)));
+		mPersist.SetValue("tw_brightness_pct", defPct.str());
 
 		ostringstream defVal;
 		defVal << TW_DEFAULT_BRIGHTNESS;
-		mValues.erase("tw_brightness");
-		mValues.insert(make_pair("tw_brightness", make_pair(defVal.str(), 1)));
+		mPersist.SetValue("tw_brightness", defVal.str());
 		TWFunc::Set_Brightness(defVal.str());
 #else
 		TWFunc::Set_Brightness(maxBrightness);
 #endif
 	}
-	mValues.insert(make_pair(TW_MILITARY_TIME, make_pair("0", 1)));
+
 #ifndef TW_EXCLUDE_ENCRYPTED_BACKUPS
-	mValues.insert(make_pair("tw_include_encrypted_backup", make_pair("1", 0)));
+	mConst.SetValue("tw_include_encrypted_backup", "1");
 #else
 	LOGINFO("TW_EXCLUDE_ENCRYPTED_BACKUPS := true\n");
-	mValues.insert(make_pair("tw_include_encrypted_backup", make_pair("0", 0)));
+	mConst.SetValue("tw_include_encrypted_backup", "0");
 #endif
 #ifdef TW_HAS_MTP
-	mConstValues.insert(make_pair("tw_has_mtp", "1"));
-	mValues.insert(make_pair("tw_mtp_enabled", make_pair("1", 1)));
-	mValues.insert(make_pair("tw_mtp_debug", make_pair("0", 1)));
+	mConst.SetValue("tw_has_mtp", "1");
+	mPersist.SetValue("tw_mtp_enabled", "1");
+	mPersist.SetValue("tw_mtp_debug", "0");
 #else
 	LOGINFO("TW_EXCLUDE_MTP := true\n");
-	mConstValues.insert(make_pair("tw_has_mtp", "0"));
-	mConstValues.insert(make_pair("tw_mtp_enabled", "0"));
+	mConst.SetValue("tw_has_mtp", "0");
+	mConst.SetValue("tw_mtp_enabled", "0");
 #endif
-	mValues.insert(make_pair("tw_mount_system_ro", make_pair("2", 1)));
-	mValues.insert(make_pair("tw_never_show_system_ro_page", make_pair("0", 1)));
-	mValues.insert(make_pair("tw_language", make_pair(EXPAND(TW_DEFAULT_LANGUAGE), 1)));
+	mPersist.SetValue("tw_mount_system_ro", "2");
+	mPersist.SetValue("tw_never_show_system_ro_page", "0");
+	mPersist.SetValue("tw_language", EXPAND(TW_DEFAULT_LANGUAGE));
 	LOGINFO("LANG: %s\n", EXPAND(TW_DEFAULT_LANGUAGE));
 
-	mValues.insert(make_pair("tw_has_adopted_storage", make_pair("0", 0)));
+	mData.SetValue("tw_has_adopted_storage", "0");
 
 	pthread_mutex_unlock(&m_valuesLock);
 }
 
 // Magic Values
-int DataManager::GetMagicValue(const string varName, string& value)
+int DataManager::GetMagicValue(const string& varName, string& value)
 {
 	// Handle special dynamic cases
 	if (varName == "tw_time")
@@ -1123,7 +1017,7 @@
 	return GetStrValue("tw_settings_path");
 }
 
-void DataManager::Vibrate(const string varName)
+void DataManager::Vibrate(const string& varName)
 {
 	int vib_value = 0;
 	GetValue(varName, vib_value);
diff --git a/data.hpp b/data.hpp
index 2ec2174..790efc9 100644
--- a/data.hpp
+++ b/data.hpp
@@ -20,9 +20,8 @@
 #define _DATAMANAGER_HPP_HEADER
 
 #include <string>
-#include <utility>
-#include <map>
 #include <pthread.h>
+#include "infomanager.hpp"
 
 using namespace std;
 
@@ -30,30 +29,30 @@
 {
 public:
 	static int ResetDefaults();
-	static int LoadValues(const string filename);
+	static int LoadValues(const string& filename);
 	static int Flush();
 
 	// Core get routines
-	static int GetValue(const string varName, string& value);
-	static int GetValue(const string varName, int& value);
-	static int GetValue(const string varName, float& value);
-	static unsigned long long GetValue(const string varName, unsigned long long& value);
+	static int GetValue(const string& varName, string& value);
+	static int GetValue(const string& varName, int& value);
+	static int GetValue(const string& varName, float& value);
+	static unsigned long long GetValue(const string& varName, unsigned long long& value);
 
 	// Helper functions
-	static string GetStrValue(const string varName);
-	static int GetIntValue(const string varName);
+	static string GetStrValue(const string& varName);
+	static int GetIntValue(const string& varName);
 
 	// Core set routines
-	static int SetValue(const string varName, string value, int persist = 0);
-	static int SetValue(const string varName, int value, int persist = 0);
-	static int SetValue(const string varName, float value, int persist = 0);
-	static int SetValue(const string varName, unsigned long long value, int persist = 0);
-	static int SetProgress(float Fraction);
-	static int ShowProgress(float Portion, float Seconds);
+	static int SetValue(const string& varName, const string& value, const int persist = 0);
+	static int SetValue(const string& varName, const int value, const int persist = 0);
+	static int SetValue(const string& varName, const float value, const int persist = 0);
+	static int SetValue(const string& varName, const unsigned long long& value, const int persist = 0);
+	static int SetProgress(const float Fraction);
+	static int ShowProgress(const float Portion, const float Seconds);
 
 	static void DumpValues();
 	static void update_tz_environment_variables();
-	static void Vibrate(const string varName);
+	static void Vibrate(const string& varName);
 	static void SetBackupFolder();
 	static void SetDefaultValues();
 	static void Output_Version(void); // Outputs the version to a file in the TWRP folder
@@ -63,18 +62,18 @@
 	static string GetSettingsStoragePath(void);
 
 protected:
-	typedef pair<string, int> TStrIntPair;
-	typedef pair<string, TStrIntPair> TNameValuePair;
-	static map<string, TStrIntPair> mValues;
 	static string mBackingFile;
 	static int mInitialized;
+	static InfoManager mPersist;
+	static InfoManager mData;
+	static InfoManager mConst;
 
 	static map<string, string> mConstValues;
 
 protected:
 	static int SaveValues();
 
-	static int GetMagicValue(string varName, string& value);
+	static int GetMagicValue(const string& varName, string& value);
 
 private:
 	static void sanitize_device_id(char* device_id);
diff --git a/infomanager.cpp b/infomanager.cpp
index 2a4c3c8..275c70c 100644
--- a/infomanager.cpp
+++ b/infomanager.cpp
@@ -16,22 +16,7 @@
 	along with TWRP.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <linux/input.h>
-#include <pthread.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
 #include <string>
-#include <utility>
 #include <map>
 #include <fstream>
 #include <sstream>
@@ -43,11 +28,34 @@
 
 using namespace std;
 
-InfoManager::InfoManager(const string filename) {
-	File = filename;
+InfoManager::InfoManager() {
+	file_version = 0;
+	is_const = false;
+}
+
+InfoManager::InfoManager(const string& filename) {
+	file_version = 0;
+	is_const = false;
+	SetFile(filename);
 }
 
 InfoManager::~InfoManager(void) {
+	Clear();
+}
+
+void InfoManager::SetFile(const string& filename) {
+	File = filename;
+}
+
+void InfoManager::SetFileVersion(int version) {
+	file_version = version;
+}
+
+void InfoManager::SetConst(void) {
+	is_const = true;
+}
+
+void InfoManager::Clear(void) {
 	mValues.clear();
 }
 
@@ -63,6 +71,16 @@
 		LOGINFO("InfoManager loading from '%s'.\n", File.c_str());
 	}
 
+	if (file_version) {
+		int read_file_version;
+		if (fread(&read_file_version, 1, sizeof(int), in) != sizeof(int))
+			goto error;
+		if (read_file_version != file_version) {
+			LOGINFO("InfoManager file version has changed, not reading file\n");
+			goto error;
+		}
+	}
+
 	while (!feof(in)) {
 		string Name;
 		string Value;
@@ -105,6 +123,10 @@
 	if (!out)
 		return -1;
 
+	if (file_version) {
+		fwrite(&file_version, 1, sizeof(int), out);
+	}
+
 	map<string, string>::iterator iter;
 	for (iter = mValues.begin(); iter != mValues.end(); ++iter) {
 		unsigned short length = (unsigned short) iter->first.length() + 1;
@@ -119,7 +141,7 @@
 	return 0;
 }
 
-int InfoManager::GetValue(const string varName, string& value) {
+int InfoManager::GetValue(const string& varName, string& value) {
 	string localStr = varName;
 
 	map<string, string>::iterator pos;
@@ -131,7 +153,7 @@
 	return 0;
 }
 
-int InfoManager::GetValue(const string varName, int& value) {
+int InfoManager::GetValue(const string& varName, int& value) {
 	string data;
 
 	if (GetValue(varName,data) != 0)
@@ -141,7 +163,7 @@
 	return 0;
 }
 
-int InfoManager::GetValue(const string varName, float& value) {
+int InfoManager::GetValue(const string& varName, float& value) {
 	string data;
 
 	if (GetValue(varName,data) != 0)
@@ -151,7 +173,7 @@
 	return 0;
 }
 
-unsigned long long InfoManager::GetValue(const string varName, unsigned long long& value) {
+unsigned long long InfoManager::GetValue(const string& varName, unsigned long long& value) {
 	string data;
 
 	if (GetValue(varName,data) != 0)
@@ -162,7 +184,7 @@
 }
 
 // This function will return an empty string if the value doesn't exist
-string InfoManager::GetStrValue(const string varName) {
+string InfoManager::GetStrValue(const string& varName) {
 	string retVal;
 
 	GetValue(varName, retVal);
@@ -170,14 +192,14 @@
 }
 
 // This function will return 0 if the value doesn't exist
-int InfoManager::GetIntValue(const string varName) {
+int InfoManager::GetIntValue(const string& varName) {
 	string retVal;
 	GetValue(varName, retVal);
 	return atoi(retVal.c_str());
 }
 
-int InfoManager::SetValue(const string varName, string value) {
-	// Don't allow empty values or numerical starting values
+int InfoManager::SetValue(const string& varName, const string& value) {
+	// Don't allow empty names or numerical starting values
 	if (varName.empty() || (varName[0] >= '0' && varName[0] <= '9'))
 		return -1;
 
@@ -185,25 +207,25 @@
 	pos = mValues.find(varName);
 	if (pos == mValues.end())
 		mValues.insert(make_pair(varName, value));
-	else
+	else if (!is_const)
 		pos->second = value;
 
 	return 0;
 }
 
-int InfoManager::SetValue(const string varName, int value) {
+int InfoManager::SetValue(const string& varName, const int value) {
 	ostringstream valStr;
 	valStr << value;
 	return SetValue(varName, valStr.str());
 }
 
-int InfoManager::SetValue(const string varName, float value) {
+int InfoManager::SetValue(const string& varName, const float value) {
 	ostringstream valStr;
 	valStr << value;
 	return SetValue(varName, valStr.str());
 }
 
-int InfoManager::SetValue(const string varName, unsigned long long value) {
+int InfoManager::SetValue(const string& varName, const unsigned long long& value) {
 	ostringstream valStr;
 	valStr << value;
 	return SetValue(varName, valStr.str());
diff --git a/infomanager.hpp b/infomanager.hpp
index de8aef4..4ce67aa 100644
--- a/infomanager.hpp
+++ b/infomanager.hpp
@@ -28,29 +28,36 @@
 class InfoManager
 {
 public:
-	InfoManager(const string filename);
+	InfoManager();
+	explicit InfoManager(const string& filename);
 	virtual ~InfoManager();
+	void SetFile(const string& filename);
+	void SetFileVersion(int version);
+	void SetConst();
+	void Clear();
 	int LoadValues();
 	int SaveValues();
 
 	// Core get routines
-	int GetValue(const string varName, string& value);
-	int GetValue(const string varName, int& value);
-	int GetValue(const string varName, float& value);
-	unsigned long long GetValue(const string varName, unsigned long long& value);
+	int GetValue(const string& varName, string& value);
+	int GetValue(const string& varName, int& value);
+	int GetValue(const string& varName, float& value);
+	unsigned long long GetValue(const string& varName, unsigned long long& value);
 
-	string GetStrValue(const string varName);
-	int GetIntValue(const string varName);
+	string GetStrValue(const string& varName);
+	int GetIntValue(const string& varName);
 
 	// Core set routines
-	int SetValue(const string varName, string value);
-	int SetValue(const string varName, int value);
-	int SetValue(const string varName, float value);
-	int SetValue(const string varName, unsigned long long value);
+	int SetValue(const string& varName, const string& value);
+	int SetValue(const string& varName, const int value);
+	int SetValue(const string& varName, const float value);
+	int SetValue(const string& varName, const unsigned long long& value);
 
 private:
 	string File;
 	map<string, string> mValues;
+	int file_version;
+	bool is_const;
 
 };
 
diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp
index e974f9d..75db902 100644
--- a/openrecoveryscript.cpp
+++ b/openrecoveryscript.cpp
@@ -254,12 +254,6 @@
 						} else if ((value2[i] == 'R' || value2[i] == 'r') && Partition_List.find("/recovery;") != string::npos) {
 							Restore_List += "/recovery;";
 							gui_msg("recovery=Recovery");
-						} else if (value2[i] == '1' && DataManager::GetIntValue(TW_RESTORE_SP1_VAR) > 0) {
-							gui_print("%s\n", "Special1 -- No Longer Supported...");
-						} else if (value2[i] == '2' && DataManager::GetIntValue(TW_RESTORE_SP2_VAR) > 0) {
-							gui_print("%s\n", "Special2 -- No Longer Supported...");
-						} else if (value2[i] == '3' && DataManager::GetIntValue(TW_RESTORE_SP3_VAR) > 0) {
-							gui_print("%s\n", "Special3 -- No Longer Supported...");
 						} else if ((value2[i] == 'B' || value2[i] == 'b') && Partition_List.find("/boot;") != string::npos) {
 							Restore_List += "/boot;";
 							gui_msg("boot=Boot");
diff --git a/partition.cpp b/partition.cpp
index fe2843c..188a739 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -285,7 +285,6 @@
 			char crypto_blkdev[255];
 			property_get("ro.crypto.fs_crypto_blkdev", crypto_blkdev, "error");
 			if (strcmp(crypto_blkdev, "error") != 0) {
-				DataManager::SetValue(TW_DATA_BLK_DEVICE, Primary_Block_Device);
 				DataManager::SetValue(TW_IS_DECRYPTED, 1);
 				Is_Encrypted = true;
 				Is_Decrypted = true;
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 5210799..1c7af5e 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1460,7 +1460,6 @@
 	} else {
 		TWPartition* dat = Find_Partition_By_Path("/data");
 		if (dat != NULL) {
-			DataManager::SetValue(TW_DATA_BLK_DEVICE, dat->Primary_Block_Device);
 			DataManager::SetValue(TW_IS_DECRYPTED, 1);
 			dat->Is_Decrypted = true;
 			dat->Decrypted_Block_Device = crypto_blkdev;
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 63ed0a6..eb1f4c2 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -506,9 +506,10 @@
 // reboot: Reboot the system. Return -1 on error, no return on success
 int TWFunc::tw_reboot(RebootCommand command)
 {
+	DataManager::Flush();
+	Update_Log_File();
 	// Always force a sync before we reboot
 	sync();
-	Update_Log_File();
 
 	switch (command) {
 		case rb_current:
diff --git a/variables.h b/variables.h
index dc47cf2..32de757 100644
--- a/variables.h
+++ b/variables.h
@@ -34,9 +34,6 @@
 #define TW_BACKUP_CACHE_VAR         "tw_backup_cache"
 #define TW_BACKUP_ANDSEC_VAR        "tw_backup_andsec"
 #define TW_BACKUP_SDEXT_VAR         "tw_backup_sdext"
-#define TW_BACKUP_SP1_VAR           "tw_backup_sp1"
-#define TW_BACKUP_SP2_VAR           "tw_backup_sp2"
-#define TW_BACKUP_SP3_VAR           "tw_backup_sp3"
 #define TW_BACKUP_AVG_IMG_RATE      "tw_backup_avg_img_rate"
 #define TW_BACKUP_AVG_FILE_RATE     "tw_backup_avg_file_rate"
 #define TW_BACKUP_AVG_FILE_COMP_RATE    "tw_backup_avg_file_comp_rate"
@@ -47,9 +44,6 @@
 #define TW_BACKUP_CACHE_SIZE        "tw_backup_cache_size"
 #define TW_BACKUP_ANDSEC_SIZE       "tw_backup_andsec_size"
 #define TW_BACKUP_SDEXT_SIZE        "tw_backup_sdext_size"
-#define TW_BACKUP_SP1_SIZE          "tw_backup_sp1_size"
-#define TW_BACKUP_SP2_SIZE          "tw_backup_sp2_size"
-#define TW_BACKUP_SP3_SIZE          "tw_backup_sp3_size"
 #define TW_STORAGE_FREE_SIZE        "tw_storage_free_size"
 #define TW_GENERATE_MD5_TEXT        "tw_generate_md5_text"
 
@@ -61,9 +55,6 @@
 #define TW_RESTORE_CACHE_VAR        "tw_restore_cache"
 #define TW_RESTORE_ANDSEC_VAR       "tw_restore_andsec"
 #define TW_RESTORE_SDEXT_VAR        "tw_restore_sdext"
-#define TW_RESTORE_SP1_VAR          "tw_restore_sp1"
-#define TW_RESTORE_SP2_VAR          "tw_restore_sp2"
-#define TW_RESTORE_SP3_VAR          "tw_restore_sp3"
 #define TW_RESTORE_AVG_IMG_RATE     "tw_restore_avg_img_rate"
 #define TW_RESTORE_AVG_FILE_RATE    "tw_restore_avg_file_rate"
 #define TW_RESTORE_AVG_FILE_COMP_RATE    "tw_restore_avg_file_comp_rate"
@@ -71,10 +62,7 @@
 #define TW_VERIFY_MD5_TEXT          "tw_verify_md5_text"
 #define TW_UPDATE_SYSTEM_DETAILS_TEXT "tw_update_system_details_text"
 
-#define TW_SHOW_SPAM_VAR            "tw_show_spam"
-#define TW_COLOR_THEME_VAR          "tw_color_theme"
 #define TW_VERSION_VAR              "tw_version"
-#define TW_SORT_FILES_BY_DATE_VAR   "tw_sort_files_by_date"
 #define TW_GUI_SORT_ORDER           "tw_gui_sort_order"
 #define TW_ZIP_LOCATION_VAR         "tw_zip_location"
 #define TW_ZIP_INTERNAL_VAR         "tw_zip_internal"
@@ -148,7 +136,6 @@
 #define TW_CRYPTO_PWTYPE            "tw_crypto_pwtype"
 #define TW_HAS_CRYPTO               "tw_has_crypto"
 #define TW_CRYPTO_PASSWORD          "tw_crypto_password"
-#define TW_DATA_BLK_DEVICE          "tw_data_blk_device"  // Original block device - not decrypted
 #define TW_SDEXT_DISABLE_EXT4       "tw_sdext_disable_ext4"
 #define TW_MILITARY_TIME            "tw_military_time"
 
