diff --git a/gui/Android.mk b/gui/Android.mk
index b3e9b09..748c5ec 100644
--- a/gui/Android.mk
+++ b/gui/Android.mk
@@ -30,7 +30,7 @@
   LOCAL_SRC_FILES += hardwarekeyboard.cpp
 endif
 
-LOCAL_MODULE := libgui
+LOCAL_MODULE := libguitwrp
 
 # Use this flag to create a build that simulates threaded actions like installing zips, backups, restores, and wipes for theme testing
 #TWRP_SIMULATE_ACTIONS := true
diff --git a/gui/action.cpp b/gui/action.cpp
index 3456324..b35074c 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -38,17 +38,15 @@
 #include "../twrp-functions.hpp"
 #include "../openrecoveryscript.hpp"
 
-#include "../ui.h"
 #include "../adb_install.h"
 #include "blanktimer.hpp"
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 #include "../variables.h"
 #include "../twinstall.h"
-
+#include "cutils/properties.h"
 #include "../minadbd/adb.h"
 
 int TWinstall_zip(const char* path, int* wipe_cache);
@@ -60,7 +58,6 @@
 #include "rapidxml.hpp"
 #include "objects.hpp"
 
-extern RecoveryUI* ui;
 extern blanktimer blankTimer;
 
 void curtainClose(void);
@@ -160,7 +157,7 @@
 
 void GUIAction::simulate_progress_bar(void)
 {
-	ui_print("Simulating actions...\n");
+	gui_print("Simulating actions...\n");
 	for (int i = 0; i < 5; i++)
 	{
 		usleep(500000);
@@ -176,7 +173,7 @@
 
     if (filename.empty())
     {
-        LOGE("No file specified.\n");
+        LOGERR("No file specified.\n");
         return -1;
     }
 
@@ -191,7 +188,7 @@
 
 	if (mzOpenZipArchive(filename.c_str(), &zip))
     {
-        LOGE("Unable to open zip file.\n");
+        LOGERR("Unable to open zip file.\n");
         return -1;
     }
 
@@ -231,10 +228,10 @@
 		{
 			DataManager::SetValue("tw_operation", "Configuring TWRP");
 			DataManager::SetValue("tw_partition", "");
-			ui_print("Configuring TWRP...\n");
+			gui_print("Configuring TWRP...\n");
 			if (TWFunc::Exec_Cmd("/sbin/installTwrp reinstall", result) < 0)
 			{
-				ui_print("Unable to configure TWRP with this kernel.\n");
+				gui_print("Unable to configure TWRP with this kernel.\n");
 			}
 		}
 	}
@@ -256,33 +253,33 @@
 	pthread_attr_t tattr;
 
 	if (pthread_attr_init(&tattr)) {
-		LOGE("Unable to pthread_attr_init\n");
+		LOGERR("Unable to pthread_attr_init\n");
 		return -1;
 	}
 	if (pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_JOINABLE)) {
-		LOGE("Error setting pthread_attr_setdetachstate\n");
+		LOGERR("Error setting pthread_attr_setdetachstate\n");
 		return -1;
 	}
 	if (pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM)) {
-		LOGE("Error setting pthread_attr_setscope\n");
+		LOGERR("Error setting pthread_attr_setscope\n");
 		return -1;
 	}
 	/*if (pthread_attr_setstacksize(&tattr, 524288)) {
-		LOGE("Error setting pthread_attr_setstacksize\n");
+		LOGERR("Error setting pthread_attr_setstacksize\n");
 		return -1;
 	}
 	*/
 	int ret = pthread_create(&t, &tattr, thread_start, this);
     if (ret) {
-		LOGE("Unable to create more threads for actions... continuing in same thread! %i\n", ret);
+		LOGERR("Unable to create more threads for actions... continuing in same thread! %i\n", ret);
 		thread_start(this);
 	} else {
 		if (pthread_join(t, NULL)) {
-			LOGE("Error joining threads\n");
+			LOGERR("Error joining threads\n");
 		}
 	}
 	if (pthread_attr_destroy(&tattr)) {
-		LOGE("Failed to pthread_attr_destroy\n");
+		LOGERR("Failed to pthread_attr_destroy\n");
 		return -1;
 	}
 
@@ -392,7 +389,7 @@
 		operation_start("Reload Theme");
 		theme_path = DataManager::GetSettingsStoragePath();
 		if (PartitionManager.Mount_By_Path(theme_path.c_str(), 1) < 0) {
-			LOGE("Unable to mount %s during reload function startup.\n", theme_path.c_str());
+			LOGERR("Unable to mount %s during reload function startup.\n", theme_path.c_str());
 			check = 1;
 		}
 
@@ -400,10 +397,10 @@
 		if (check != 0 || PageManager::ReloadPackage("TWRP", theme_path) != 0)
 		{
 			// Loading the custom theme failed - try loading the stock theme
-			LOGI("Attempting to reload stock theme...\n");
+			LOGINFO("Attempting to reload stock theme...\n");
 			if (PageManager::ReloadPackage("TWRP", "/res/ui.xml"))
 			{
-				LOGE("Failed to load base packages.\n");
+				LOGERR("Failed to load base packages.\n");
 				ret_val = 1;
 			}
 		}
@@ -446,7 +443,7 @@
 			if (!simulate)
 				PartitionManager.usb_storage_enable();
 			else
-				ui_print("Simulating actions...\n");
+				gui_print("Simulating actions...\n");
         }
         else if (!simulate)
         {
@@ -458,7 +455,7 @@
 			else
 				PartitionManager.Mount_By_Path(arg, true);
         } else
-			ui_print("Simulating actions...\n");
+			gui_print("Simulating actions...\n");
         return 0;
     }
 
@@ -469,7 +466,7 @@
             if (!simulate)
 				PartitionManager.usb_storage_disable();
 			else
-				ui_print("Simulating actions...\n");
+				gui_print("Simulating actions...\n");
 			DataManager::SetValue(TW_ACTION_BUSY, 0);
         }
         else if (!simulate)
@@ -482,7 +479,7 @@
 			else
 				PartitionManager.UnMount_By_Path(arg, true);
         } else
-			ui_print("Simulating actions...\n");
+			gui_print("Simulating actions...\n");
         return 0;
     }
 	
@@ -490,7 +487,7 @@
 	{
 		operation_start("Restore Defaults");
 		if (simulate) // Simulated so that people don't accidently wipe out the "simulation is on" setting
-			ui_print("Simulating actions...\n");
+			gui_print("Simulating actions...\n");
 		else {
 			DataManager::ResetDefaults();
 			PartitionManager.Update_System_Details();
@@ -509,7 +506,7 @@
 			dst = DataManager::GetCurrentStoragePath() + "/recovery.log";
 			TWFunc::copy_file("/tmp/recovery.log", dst.c_str(), 0755);
 			sync();
-			ui_print("Copied recovery log to %s.\n", DataManager::GetCurrentStoragePath().c_str());
+			gui_print("Copied recovery log to %s.\n", DataManager::GetCurrentStoragePath().c_str());
 		} else
 			simulate_progress_bar();
 		operation_end(0, simulate);
@@ -631,7 +628,7 @@
 	if (function == "queuezip")
     {
         if (zip_queue_index >= 10) {
-			ui_print("Maximum zip queue reached!\n");
+			gui_print("Maximum zip queue reached!\n");
 			return 0;
 		}
 		DataManager::GetValue("tw_filename", zip_queue[zip_queue_index]);
@@ -645,7 +642,7 @@
 	if (function == "cancelzip")
     {
         if (zip_queue_index <= 0) {
-			ui_print("Minimum zip queue reached!\n");
+			gui_print("Minimum zip queue reached!\n");
 			return 0;
 		} else {
 			zip_queue_index--;
@@ -694,7 +691,7 @@
 
 				ret_val = flash_zip(zip_queue[i], arg, simulate, &wipe_cache);
 				if (ret_val != 0) {
-					ui_print("Error flashing zip '%s'\n", zip_queue[i].c_str());
+					gui_print("Error flashing zip '%s'\n", zip_queue[i].c_str());
 					i = 10; // Error flashing zip - exit queue
 					ret_val = 1;
 				}
@@ -707,7 +704,7 @@
 			string result;
 			if (DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
 				operation_start("ReinjectTWRP");
-				ui_print("Injecting TWRP into boot image...\n");
+				gui_print("Injecting TWRP into boot image...\n");
 				if (simulate) {
 					simulate_progress_bar();
 				} else {
@@ -718,7 +715,7 @@
 						string injectcmd = "injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash bd=" + Boot->Actual_Block_Device;
 						TWFunc::Exec_Cmd(injectcmd, result);
 					}
-					ui_print("TWRP injection complete.\n");
+					gui_print("TWRP injection complete.\n");
 				}
 			}
 			PartitionManager.Update_System_Details();
@@ -768,15 +765,15 @@
 					TWPartition* wipe_part = NULL;
 
 					DataManager::GetValue("tw_wipe_list", Wipe_List);
-					LOGI("wipe list '%s'\n", Wipe_List.c_str());
+					LOGINFO("wipe list '%s'\n", Wipe_List.c_str());
 					if (!Wipe_List.empty()) {
 						size_t start_pos = 0, end_pos = Wipe_List.find(";", start_pos);
 						while (end_pos != string::npos && start_pos < Wipe_List.size()) {
 							wipe_path = Wipe_List.substr(start_pos, end_pos - start_pos);
-							LOGI("wipe_path '%s'\n", wipe_path.c_str());
+							LOGINFO("wipe_path '%s'\n", wipe_path.c_str());
 							if (wipe_path == "/and-sec") {
 								if (!PartitionManager.Wipe_Android_Secure()) {
-									LOGE("Unable to wipe android secure\n");
+									LOGERR("Unable to wipe android secure\n");
 									ret_val = false;
 									break;
 								} else {
@@ -784,7 +781,7 @@
 								}
 							} else if (wipe_path == "DALVIK") {
 								if (!PartitionManager.Wipe_Dalvik_Cache()) {
-									LOGE("Failed to wipe dalvik\n");
+									LOGERR("Failed to wipe dalvik\n");
 									ret_val = false;
 									break;
 								} else {
@@ -793,7 +790,7 @@
 							}
 							if (!skip) {
 								if (!PartitionManager.Wipe_By_Path(wipe_path)) {
-									LOGE("Unable to wipe '%s'\n", wipe_path.c_str());
+									LOGERR("Unable to wipe '%s'\n", wipe_path.c_str());
 									ret_val = false;
 									break;
 								} else if (wipe_path == DataManager::GetSettingsStoragePath()) {
@@ -814,12 +811,12 @@
 					string Storage_Path = DataManager::GetSettingsStoragePath();
 
 					if (PartitionManager.Mount_By_Path(Storage_Path, true)) {
-						LOGI("Making TWRP folder and saving settings.\n");
+						LOGINFO("Making TWRP folder and saving settings.\n");
 						Storage_Path += "/TWRP";
 						mkdir(Storage_Path.c_str(), 0777);
 						DataManager::Flush();
 					} else {
-						LOGE("Unable to recreate TWRP folder and save settings.\n");
+						LOGERR("Unable to recreate TWRP folder and save settings.\n");
 					}
 				}
 			}
@@ -879,7 +876,7 @@
 		if (function == "fixpermissions")
 		{
 			operation_start("Fix Permissions");
-            LOGI("fix permissions started!\n");
+            LOGINFO("fix permissions started!\n");
 			if (simulate) {
 				simulate_progress_bar();
 			} else {
@@ -915,7 +912,7 @@
 				int allow_partition;
 				DataManager::GetValue(TW_ALLOW_PARTITION_SDCARD, allow_partition);
 				if (allow_partition == 0) {
-					ui_print("This device does not have a real SD Card!\nAborting!\n");
+					gui_print("This device does not have a real SD Card!\nAborting!\n");
 				} else {
 					if (!PartitionManager.Partition_SDCard())
 						ret_val = 1; // failed
@@ -963,7 +960,7 @@
 			string result;
 
 			operation_start("Command");
-			LOGI("Running command: '%s'\n", arg.c_str());
+			LOGINFO("Running command: '%s'\n", arg.c_str());
 			if (simulate) {
 				simulate_progress_bar();
 			} else {
@@ -982,19 +979,19 @@
 
 			DataManager::GetValue("tw_terminal_location", cmdpath);
 			operation_start("CommandOutput");
-			ui_print("%s # %s\n", cmdpath.c_str(), arg.c_str());
+			gui_print("%s # %s\n", cmdpath.c_str(), arg.c_str());
 			if (simulate) {
 				simulate_progress_bar();
 				operation_end(op_status, simulate);
 			} else {
 				command = "cd \"" + cmdpath + "\" && " + arg + " 2>&1";;
-				LOGI("Actual command is: '%s'\n", command.c_str());
+				LOGINFO("Actual command is: '%s'\n", command.c_str());
 				DataManager::SetValue("tw_terminal_command_thread", command);
 				DataManager::SetValue("tw_terminal_state", 1);
 				DataManager::SetValue("tw_background_thread_running", 1);
 				op_status = pthread_create(&terminal_command, NULL, command_thread, NULL);
 				if (op_status != 0) {
-					LOGE("Error starting terminal command thread, %i.\n", op_status);
+					LOGERR("Error starting terminal command thread, %i.\n", op_status);
 					DataManager::SetValue("tw_terminal_state", 0);
 					DataManager::SetValue("tw_background_thread_running", 0);
 					operation_end(1, simulate);
@@ -1006,7 +1003,7 @@
 		{
 			int op_status = 0;
 
-			LOGI("Sending kill command...\n");
+			LOGINFO("Sending kill command...\n");
 			operation_start("KillCommand");
 			DataManager::SetValue("tw_operation_status", 0);
 			DataManager::SetValue("tw_operation_state", 1);
@@ -1020,12 +1017,12 @@
 			int op_status = 0;
 			string result;
 			operation_start("ReinjectTWRP");
-			ui_print("Injecting TWRP into boot image...\n");
+			gui_print("Injecting TWRP into boot image...\n");
 			if (simulate) {
 				simulate_progress_bar();
 			} else {
 				TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash", result);
-				ui_print("TWRP injection complete.\n");
+				gui_print("TWRP injection complete.\n");
 			}
 
 			operation_end(op_status, simulate);
@@ -1077,7 +1074,7 @@
 
 							theme_path = DataManager::GetSettingsStoragePath();
 							if (PartitionManager.Mount_By_Path(theme_path.c_str(), 1) < 0) {
-								LOGE("Unable to mount %s during reload function startup.\n", theme_path.c_str());
+								LOGERR("Unable to mount %s during reload function startup.\n", theme_path.c_str());
 								check = 1;
 							}
 
@@ -1086,10 +1083,10 @@
 								if (PageManager::ReloadPackage("TWRP", theme_path) != 0)
 								{
 									// Loading the custom theme failed - try loading the stock theme
-									LOGI("Attempting to reload stock theme...\n");
+									LOGINFO("Attempting to reload stock theme...\n");
 									if (PageManager::ReloadPackage("TWRP", "/res/ui.xml"))
 									{
-										LOGE("Failed to load base packages.\n");
+										LOGERR("Failed to load base packages.\n");
 									}
 								}
 							}
@@ -1121,20 +1118,23 @@
 				if (TWFunc::Path_Exists(Sideload_File)) {
 					unlink(Sideload_File.c_str());
 				}
-				ui_print("Starting ADB sideload feature...\n");
+				gui_print("Starting ADB sideload feature...\n");
 				DataManager::GetValue("tw_wipe_dalvik", wipe_dalvik);
-				ret = apply_from_adb(ui, &wipe_cache, Sideload_File.c_str());
+				ret = apply_from_adb(Sideload_File.c_str());
+				DataManager::SetValue("tw_has_cancel", 0); // Remove cancel button from gui now that the zip install is going to start
 				if (ret != 0) {
 					ret = 1; // failure
-				} else {
+				} else if (TWinstall_zip(Sideload_File.c_str(), &wipe_cache) == 0) {
 					if (wipe_cache || DataManager::GetIntValue("tw_wipe_cache"))
 						PartitionManager.Wipe_By_Path("/cache");
 					if (wipe_dalvik)
 						PartitionManager.Wipe_Dalvik_Cache();
+				} else {
+					ret = 1; // failure
 				}
 				if (DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
 					operation_start("ReinjectTWRP");
-					ui_print("Injecting TWRP into boot image...\n");
+					gui_print("Injecting TWRP into boot image...\n");
 					if (simulate) {
 						simulate_progress_bar();
 					} else {
@@ -1145,7 +1145,7 @@
 							string injectcmd = "injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash bd=" + Boot->Actual_Block_Device;
 							TWFunc::Exec_Cmd(injectcmd, result);
 						}
-						ui_print("TWRP injection complete.\n");
+						gui_print("TWRP injection complete.\n");
 					}
 				}
 			}
@@ -1155,11 +1155,17 @@
 		if (function == "adbsideloadcancel")
 		{
 			int child_pid;
+			char child_prop[PROPERTY_VALUE_MAX];
 			string Sideload_File;
 			Sideload_File = DataManager::GetCurrentStoragePath() + "/sideload.zip";
 			unlink(Sideload_File.c_str());
-			DataManager::GetValue("tw_child_pid", child_pid);
-			ui_print("Cancelling ADB sideload...\n");
+			property_get("tw_child_pid", child_prop, "error");
+			if (strcmp(child_prop, "error") == 0) {
+				LOGERR("Unable to get child ID from prop\n");
+				return 0;
+			}
+			child_pid = atoi(child_prop);
+			gui_print("Cancelling ADB sideload...\n");
 			kill(child_pid, SIGTERM);
 			DataManager::SetValue("tw_page_done", "1"); // For OpenRecoveryScript support
 			return 0;
@@ -1174,14 +1180,14 @@
 				// Run those first.
 				int reboot = 0;
 				if (TWFunc::Path_Exists(SCRIPT_FILE_TMP)) {
-					ui_print("Processing AOSP recovery commands...\n");
+					gui_print("Processing AOSP recovery commands...\n");
 					if (OpenRecoveryScript::run_script_file() == 0) {
 						reboot = 1;
 					}
 				}
 				// Check for the ORS file in /cache and attempt to run those commands.
 				if (OpenRecoveryScript::check_for_script_file()) {
-					ui_print("Processing OpenRecoveryScript file...\n");
+					gui_print("Processing OpenRecoveryScript file...\n");
 					if (OpenRecoveryScript::run_script_file() == 0) {
 						reboot = 1;
 					}
@@ -1263,7 +1269,7 @@
 	DataManager::GetValue("tw_terminal_command_thread", command);
 	fp = popen(command.c_str(), "r");
 	if (fp == NULL) {
-		LOGE("Error opening command to run.\n");
+		LOGERR("Error opening command to run.\n");
 	} else {
 		int fd = fileno(fp), has_data = 0, check = 0, keep_going = -1, bytes_read = 0;
 		struct timeval timeout;
@@ -1290,7 +1296,7 @@
 				memset(line, 0, sizeof(line));
 				bytes_read = read(fd, line, sizeof(line));
 				if (bytes_read > 0)
-					ui_print("%s", line); // Display output
+					gui_print("%s", line); // Display output
 				else
 					keep_going = 0; // Done executing
 			}
diff --git a/gui/animation.cpp b/gui/animation.cpp
index 3021f46..77d7b54 100644
--- a/gui/animation.cpp
+++ b/gui/animation.cpp
@@ -18,9 +18,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
diff --git a/gui/blanktimer.cpp b/gui/blanktimer.cpp
index 17cc0b3..700a9ad 100644
--- a/gui/blanktimer.cpp
+++ b/gui/blanktimer.cpp
@@ -39,8 +39,7 @@
 #include "blanktimer.hpp"
 #include "../data.hpp"
 extern "C" {
-#include "../common.h"
-#include "../recovery_ui.h"
+#include "../twcommon.h"
 }
 #include "../twrp-functions.hpp"
 #include "../variables.h"
@@ -140,7 +139,7 @@
 		case 3:
 #ifndef TW_NO_SCREEN_BLANK
 			if (gr_fb_blank(0) < 0) {
-				LOGI("blanktimer::resetTimerAndUnblank failed to gr_fb_blank(0)\n");
+				LOGINFO("blanktimer::resetTimerAndUnblank failed to gr_fb_blank(0)\n");
 				break;
 			}
 #endif
diff --git a/gui/button.cpp b/gui/button.cpp
index 5ba8182..af7d07b 100644
--- a/gui/button.cpp
+++ b/gui/button.cpp
@@ -34,9 +34,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -87,7 +86,7 @@
 		}
 	}
 	if (!hasFill && mButtonImg == NULL) {
-		LOGE("No image resource or fill specified for button.\n");
+		LOGERR("No image resource or fill specified for button.\n");
 	}
 
     // The icon is a special case
diff --git a/gui/checkbox.cpp b/gui/checkbox.cpp
index e52b589..077d5e2 100644
--- a/gui/checkbox.cpp
+++ b/gui/checkbox.cpp
@@ -18,9 +18,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
diff --git a/gui/conditional.cpp b/gui/conditional.cpp
index 4e8a492..b3aba2d 100644
--- a/gui/conditional.cpp
+++ b/gui/conditional.cpp
@@ -18,9 +18,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 #include "../variables.h"
 }
 
diff --git a/gui/console.cpp b/gui/console.cpp
index 7631e43..8a7a85e 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -18,9 +18,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp
index d2be865..539bba0 100644
--- a/gui/fileselector.cpp
+++ b/gui/fileselector.cpp
@@ -38,10 +38,8 @@
 #include <algorithm>
 
 extern "C" {
-#include "../common.h"
-#include "../roots.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -945,7 +943,7 @@
 	d = opendir(folder.c_str());
 	if (d == NULL)
 	{
-		LOGI("Unable to open '%s'\n", folder.c_str());
+		LOGINFO("Unable to open '%s'\n", folder.c_str());
 		if (folder != "/" && (mShowNavFolders != 0 || mShowFiles != 0)) {
 			size_t found;
 			found = folder.find_last_of('/');
diff --git a/gui/fill.cpp b/gui/fill.cpp
index 11b700f..901eee1 100644
--- a/gui/fill.cpp
+++ b/gui/fill.cpp
@@ -18,9 +18,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -36,7 +35,7 @@
 
     attr = node->first_attribute("color");
     if (!attr) {
-		LOGE("No color specified for fill\n");
+		LOGERR("No color specified for fill\n");
         return;
 	}
 
diff --git a/gui/gui.cpp b/gui/gui.cpp
index f08d68b..4c7bf5b 100644
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -35,10 +35,8 @@
 
 extern "C"
 {
-#include "../common.h"
-#include "../roots.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 #include "../minzip/Zip.h"
 #include <pixelflinger/pixelflinger.h>
 }
@@ -217,7 +215,7 @@
 			  touch_repeat = 1;
 			  gettimeofday (&touchStart, NULL);
 #ifdef _EVENT_LOGGING
-			  LOGE ("TOUCH_HOLD: %d,%d\n", x, y);
+			  LOGERR("TOUCH_HOLD: %d,%d\n", x, y);
 #endif
 			  PageManager::NotifyTouch (TOUCH_HOLD, x, y);
                           blankTimer.resetTimerAndUnblank();
@@ -225,7 +223,7 @@
 		  else if (touch_repeat && mtime > 100)
 			{
 #ifdef _EVENT_LOGGING
-			  LOGE ("TOUCH_REPEAT: %d,%d\n", x, y);
+			  LOGERR("TOUCH_REPEAT: %d,%d\n", x, y);
 #endif
 			  gettimeofday (&touchStart, NULL);
 			  PageManager::NotifyTouch (TOUCH_REPEAT, x, y);
@@ -234,7 +232,7 @@
 		  else if (key_repeat == 1 && mtime > 500)
 			{
 #ifdef _EVENT_LOGGING
-			  LOGE ("KEY_HOLD: %d,%d\n", x, y);
+			  LOGERR("KEY_HOLD: %d,%d\n", x, y);
 #endif
 			  gettimeofday (&touchStart, NULL);
 			  key_repeat = 2;
@@ -244,7 +242,7 @@
 		  else if (key_repeat == 2 && mtime > 100)
 			{
 #ifdef _EVENT_LOGGING
-			  LOGE ("KEY_REPEAT: %d,%d\n", x, y);
+			  LOGERR("KEY_REPEAT: %d,%d\n", x, y);
 #endif
 			  gettimeofday (&touchStart, NULL);
 			  kb.KeyRepeat ();
@@ -262,7 +260,7 @@
 			  if (state == 0)
 				{
 #ifdef _EVENT_LOGGING
-				  LOGE ("TOUCH_RELEASE: %d,%d\n", x, y);
+				  LOGERR("TOUCH_RELEASE: %d,%d\n", x, y);
 #endif
 				  PageManager::NotifyTouch (TOUCH_RELEASE, x, y);
 				  blankTimer.resetTimerAndUnblank();
@@ -279,7 +277,7 @@
 			  if (!drag)
 				{
 #ifdef _EVENT_LOGGING
-				  LOGE ("TOUCH_START: %d,%d\n", x, y);
+				  LOGERR("TOUCH_START: %d,%d\n", x, y);
 #endif
 				  if (PageManager::NotifyTouch (TOUCH_START, x, y) > 0)
 					state = 1;
@@ -295,7 +293,7 @@
 				  if (state == 0)
 					{
 #ifdef _EVENT_LOGGING
-					  LOGE ("TOUCH_DRAG: %d,%d\n", x, y);
+					  LOGERR("TOUCH_DRAG: %d,%d\n", x, y);
 #endif
 					  if (PageManager::NotifyTouch (TOUCH_DRAG, x, y) > 0)
 						state = 1;
@@ -309,7 +307,7 @@
 		{
 		  // Handle key-press here
 #ifdef _EVENT_LOGGING
-		  LOGE ("TOUCH_KEY: %d\n", ev.code);
+		  LOGERR("TOUCH_KEY: %d\n", ev.code);
 #endif
 		  if (ev.value != 0)
 			{
@@ -502,7 +500,7 @@
 int
 gui_changePage (std::string newPage)
 {
-  LOGI ("Set page: '%s'\n", newPage.c_str ());
+  LOGINFO("Set page: '%s'\n", newPage.c_str ());
   PageManager::ChangePage (newPage);
   pthread_mutex_lock(&gForceRendermutex);
   gForceRender = 1;
@@ -600,41 +598,41 @@
 	{
 	  if (PageManager::LoadPackage ("TWRP", "/res/ui.xml", "decrypt"))
 		{
-		  LOGE ("Failed to load base packages.\n");
+		  LOGERR("Failed to load base packages.\n");
 		  goto error;
 		}
 	  else
 		check = 1;
 	}
   if (check == 0
-	  && PageManager::LoadPackage ("TWRP", "/script/ui.xml", "main"))
+	  && PageManager::LoadPackage("TWRP", "/script/ui.xml", "main"))
 	{
 	  std::string theme_path;
 
 	  theme_path = DataManager::GetSettingsStoragePath ();
-	  if (!PartitionManager.Mount_Settings_Storage (false))
+	  if (!PartitionManager.Mount_Settings_Storage(false))
 		{
 		  int retry_count = 5;
 		  while (retry_count > 0
-				 && !PartitionManager.Mount_Settings_Storage (false))
+				 && !PartitionManager.Mount_Settings_Storage(false))
 			{
 			  usleep (500000);
 			  retry_count--;
 			}
-		  if (!PartitionManager.Mount_Settings_Storage (false))
+		  if (!PartitionManager.Mount_Settings_Storage(false))
 			{
-			  LOGE ("Unable to mount %s during GUI startup.\n",
+			  LOGERR("Unable to mount %s during GUI startup.\n",
 					theme_path.c_str ());
 			  check = 1;
 			}
 		}
 
 	  theme_path += "/TWRP/theme/ui.zip";
-	  if (check || PageManager::LoadPackage ("TWRP", theme_path, "main"))
+	  if (check || PageManager::LoadPackage("TWRP", theme_path, "main"))
 		{
-		  if (PageManager::LoadPackage ("TWRP", "/res/ui.xml", "main"))
+		  if (PageManager::LoadPackage("TWRP", "/res/ui.xml", "main"))
 			{
-			  LOGE ("Failed to load base packages.\n");
+			  LOGERR("Failed to load base packages.\n");
 			  goto error;
 			}
 		}
@@ -647,7 +645,7 @@
   return 0;
 
 error:
-  LOGE ("An internal error has occurred.\n");
+  LOGERR("An internal error has occurred.\n");
   gGuiInitialized = 0;
   return -1;
 }
@@ -687,7 +685,7 @@
 	loopTimer ();
 
   // Set the default package
-  PageManager::SelectPackage ("TWRP");
+  PageManager::SelectPackage("TWRP");
 
   if (!gGuiInputRunning)
 	{
@@ -697,7 +695,7 @@
 	  gGuiInputRunning = 1;
 	}
 
-  DataManager::SetValue ("tw_page_done", 0);
+  DataManager::SetValue("tw_page_done", 0);
   return runPage (page_name);
 }
 
@@ -722,7 +720,7 @@
 			flip ();
 
 		  if (ret < 0)
-			LOGE ("An update request has failed.\n");
+			LOGERR("An update request has failed.\n");
 		}
 	  else
 		{
diff --git a/gui/hardwarekeyboard.cpp b/gui/hardwarekeyboard.cpp
index 39b02cc..96958d5 100644
--- a/gui/hardwarekeyboard.cpp
+++ b/gui/hardwarekeyboard.cpp
@@ -19,9 +19,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -37,7 +36,7 @@
 
 int HardwareKeyboard::KeyDown(int key_code) {
 #ifdef _EVENT_LOGGING
-	LOGE("HardwareKeyboard::KeyDown %i\n", key_code);
+	LOGERR("HardwareKeyboard::KeyDown %i\n", key_code);
 #endif
 	PageManager::NotifyKey(key_code);
 	return 0; // 0 = no key repeat anything else turns on key repeat
@@ -45,14 +44,14 @@
 
 int HardwareKeyboard::KeyUp(int key_code) {
 #ifdef _EVENT_LOGGING
-	LOGE("HardwareKeyboard::KeyUp %i\n", key_code);
+	LOGERR("HardwareKeyboard::KeyUp %i\n", key_code);
 #endif
 	return 0;
 }
 
 int HardwareKeyboard::KeyRepeat(void) {
 #ifdef _EVENT_LOGGING
-	LOGE("HardwareKeyboard::KeyRepeat\n");
+	LOGERR("HardwareKeyboard::KeyRepeat\n");
 #endif
 	return 0;
 }
diff --git a/gui/image.cpp b/gui/image.cpp
index 05e5178..c684d1b 100644
--- a/gui/image.cpp
+++ b/gui/image.cpp
@@ -18,9 +18,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
diff --git a/gui/input.cpp b/gui/input.cpp
index 2418c4c..e016724 100644
--- a/gui/input.cpp
+++ b/gui/input.cpp
@@ -20,9 +20,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -300,7 +299,7 @@
 				}
 			}
 		} else
-			LOGI("GUIInput::HandleTextLocation -> We really shouldn't ever get here...\n");
+			LOGINFO("GUIInput::HandleTextLocation -> We really shouldn't ever get here...\n");
 	} else if (x > lastX) {
 		// Dragging to right, scrolling left
 		while (-1) {
diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp
index b74ff56..7b6d006 100644
--- a/gui/keyboard.cpp
+++ b/gui/keyboard.cpp
@@ -38,9 +38,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -116,7 +115,7 @@
 	while (keylayout)
 	{
 		if (layoutindex > MAX_KEYBOARD_LAYOUTS) {
-			LOGE("Too many layouts defined in keyboard.\n");
+			LOGERR("Too many layouts defined in keyboard.\n");
 			return;
 		}
 
@@ -141,7 +140,7 @@
 		while (keyrow)
 		{
 			if (rowindex > MAX_KEYBOARD_ROWS) {
-				LOGE("Too many rows defined in keyboard.\n");
+				LOGERR("Too many rows defined in keyboard.\n");
 				return;
 			}
 
@@ -158,20 +157,20 @@
 				char keyinfo[255];
 
 				if (keyindex > MAX_KEYBOARD_KEYS) {
-					LOGE("Too many keys defined in a keyboard row.\n");
+					LOGERR("Too many keys defined in a keyboard row.\n");
 					return;
 				}
 
 				stratt = attr->value();
 				if (strlen(stratt.c_str()) >= 255) {
-					LOGE("Key info on layout%i, row%i, key%dd is too long.\n", layoutindex, rowindex, keyindex);
+					LOGERR("Key info on layout%i, row%i, key%dd is too long.\n", layoutindex, rowindex, keyindex);
 					return;
 				}
 
 				strcpy(keyinfo, stratt.c_str());
 
 				if (strlen(keyinfo) == 0) {
-					LOGE("No key info on layout%i, row%i, key%dd.\n", layoutindex, rowindex, keyindex);
+					LOGERR("No key info on layout%i, row%i, key%dd.\n", layoutindex, rowindex, keyindex);
 					return;
 				}
 
@@ -220,7 +219,7 @@
 						// This is an action
 						keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].key = KEYBOARD_ACTION;
 					} else
-						LOGE("Invalid key info on layout%i, row%i, key%02i.\n", layoutindex, rowindex, keyindex);
+						LOGERR("Invalid key info on layout%i, row%i, key%02i.\n", layoutindex, rowindex, keyindex);
 				}
 
 				// PROCESS LONG PRESS INFO IF EXISTS
@@ -229,14 +228,14 @@
 				if (attr) {
 					stratt = attr->value();
 					if (strlen(stratt.c_str()) >= 255) {
-						LOGE("Key info on layout%i, row%i, key%dd is too long.\n", layoutindex, rowindex, keyindex);
+						LOGERR("Key info on layout%i, row%i, key%dd is too long.\n", layoutindex, rowindex, keyindex);
 						return;
 					}
 
 					strcpy(keyinfo, stratt.c_str());
 
 					if (strlen(keyinfo) == 0) {
-						LOGE("No long press info on layout%i, row%i, long%dd.\n", layoutindex, rowindex, keyindex);
+						LOGERR("No long press info on layout%i, row%i, long%dd.\n", layoutindex, rowindex, keyindex);
 						return;
 					}
 
@@ -282,7 +281,7 @@
 							// This is an action
 							keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].longpresskey = KEYBOARD_ACTION;
 						} else
-							LOGE("Invalid long press key info on layout%i, row%i, long%02i.\n", layoutindex, rowindex, keyindex);
+							LOGERR("Invalid long press key info on layout%i, row%i, long%02i.\n", layoutindex, rowindex, keyindex);
 					}
 				}
 				keyindex++;
diff --git a/gui/listbox.cpp b/gui/listbox.cpp
index 910a6a3..3af40ed 100644
--- a/gui/listbox.cpp
+++ b/gui/listbox.cpp
@@ -38,10 +38,8 @@
 #include <algorithm>
 
 extern "C" {
-#include "../common.h"
-#include "../roots.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
diff --git a/gui/pages.cpp b/gui/pages.cpp
index 40de44f..bf44b38 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -35,9 +35,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -171,11 +170,11 @@
         mName = page->first_attribute("name")->value();
     else
     {
-        LOGE("No page name attribute found!\n");
+        LOGERR("No page name attribute found!\n");
         return;
     }
 
-    LOGI("Loading page %s\n", mName.c_str());
+    LOGINFO("Loading page %s\n", mName.c_str());
 
     // This is a recursive routine for template handling
     ProcessNode(page, templates);
@@ -187,7 +186,7 @@
 {
     if (depth == 10)
     {
-        LOGE("Page processing depth has exceeded 10. Failing out. This is likely a recursive template.\n");
+        LOGERR("Page processing depth has exceeded 10. Failing out. This is likely a recursive template.\n");
         return false;
     }
 
@@ -303,7 +302,7 @@
         {
             if (!templates || !child->first_attribute("name"))
             {
-                LOGE("Invalid template request.\n");
+                LOGERR("Invalid template request.\n");
             }
             else
             {
@@ -331,7 +330,7 @@
         }
         else
         {
-            LOGE("Unknown object type.\n");
+            LOGERR("Unknown object type.\n");
         }
         child = child->next_sibling("object");
     }
@@ -349,7 +348,7 @@
     for (iter = mRenders.begin(); iter != mRenders.end(); iter++)
     {
         if ((*iter)->Render())
-            LOGE("A render request has failed.\n");
+            LOGERR("A render request has failed.\n");
     }
     return 0;
 }
@@ -363,7 +362,7 @@
     {
         int ret = (*iter)->Update();
         if (ret < 0)
-            LOGE("An update request has failed.\n");
+            LOGERR("An update request has failed.\n");
         else if (ret > retCode)
             retCode = ret;
     }
@@ -421,7 +420,7 @@
         if (ret == 0)
             return 0;
         else if (ret < 0)
-            LOGE("An action handler has returned an error");
+            LOGERR("An action handler has returned an error");
     }
     return 1;
 }
@@ -440,7 +439,7 @@
         if (ret == 0)
             return 0;
         else if (ret < 0)
-            LOGE("A keyboard handler has returned an error");
+            LOGERR("A keyboard handler has returned an error");
     }
     return 1;
 }
@@ -459,7 +458,7 @@
         if (ret == 0)
             return 0;
         else if (ret < 0)
-            LOGE("An input focus handler has returned an error");
+            LOGERR("An input focus handler has returned an error");
     }
     return 1;
 }
@@ -485,7 +484,7 @@
     for (iter = mActions.begin(); iter != mActions.end(); ++iter)
     {
         if ((*iter)->NotifyVarChange(varName, value))
-            LOGE("An action handler errored on NotifyVarChange.\n");
+            LOGERR("An action handler errored on NotifyVarChange.\n");
     }
     return 0;
 }
@@ -520,17 +519,17 @@
         parent = mDoc.first_node("install");
 
     // Now, let's parse the XML
-    LOGI("Loading resources...\n");
+    LOGINFO("Loading resources...\n");
     child = parent->first_node("resources");
     if (child)
         mResources = new ResourceManager(child, package);
 
-    LOGI("Loading variables...\n");
+    LOGINFO("Loading variables...\n");
     child = parent->first_node("variables");
     if (child)
         LoadVariables(child);
 
-    LOGI("Loading pages...\n");
+    LOGINFO("Loading pages...\n");
     // This may be NULL if no templates are present
     templates = parent->first_node("templates");
 
@@ -554,7 +553,7 @@
     }
     else
     {
-        LOGE("Unable to locate page (%s)\n", page.c_str());
+        LOGERR("Unable to locate page (%s)\n", page.c_str());
     }
     return -1;
 }
@@ -618,7 +617,7 @@
         Page* page = new Page(child, templates);
         if (page->GetName().empty())
         {
-            LOGE("Unable to process load page\n");
+            LOGERR("Unable to process load page\n");
             delete page;
         }
         else
@@ -697,7 +696,7 @@
     int ret;
 
     // Open the XML file
-    LOGI("Loading package: %s (%s)\n", name.c_str(), package.c_str());
+    LOGINFO("Loading package: %s (%s)\n", name.c_str(), package.c_str());
     if (mzOpenZipArchive(package.c_str(), &zip))
     {
         // We can try to load the XML directly...
@@ -721,7 +720,7 @@
         const ZipEntry* ui_xml = mzFindZipEntry(&zip, "ui.xml");
         if (ui_xml == NULL)
         {
-            LOGE("Unable to locate ui.xml in zip file\n");
+            LOGERR("Unable to locate ui.xml in zip file\n");
             goto error;
         }
     
@@ -732,7 +731,7 @@
     
         if (!mzExtractZipEntryToBuffer(&zip, ui_xml, (unsigned char*) xmlFile))
         {
-            LOGE("Unable to extract ui.xml\n");
+            LOGERR("Unable to extract ui.xml\n");
             goto error;
         }
     }
@@ -752,7 +751,7 @@
     }
     else
     {
-        LOGE("Package %s failed to load.\n", name.c_str());
+        LOGERR("Package %s failed to load.\n", name.c_str());
     }
 	
     // The first successful package we loaded is the base
@@ -765,7 +764,7 @@
     return ret;
 
 error:
-    LOGE("An internal error has occurred.\n");
+    LOGERR("An internal error has occurred.\n");
     if (pZip)       mzCloseZipArchive(pZip);
     if (xmlFile)    free(xmlFile);
     return -1;
@@ -780,20 +779,20 @@
     {
         return (*iter).second;
     }
-    LOGE("Unable to locate package %s\n", name.c_str());
+    LOGERR("Unable to locate package %s\n", name.c_str());
     return NULL;
 }
 
 PageSet* PageManager::SelectPackage(std::string name)
 {
-    LOGI("Switching packages (%s)\n", name.c_str());
+    LOGINFO("Switching packages (%s)\n", name.c_str());
     PageSet* tmp;
 
     tmp = FindPackage(name);
     if (tmp)
         mCurrentSet = tmp;
     else
-        LOGE("Unable to find package.\n");
+        LOGERR("Unable to find package.\n");
 
     return mCurrentSet;
 }
@@ -811,7 +810,7 @@
 
     if (LoadPackage(name, package, "main") != 0)
     {
-        LOGE("Failed to load package.\n");
+        LOGERR("Failed to load package.\n");
         mPageSets.insert(std::pair<std::string, PageSet*>(name, set));
         return -1;
     }
diff --git a/gui/partitionlist.cpp b/gui/partitionlist.cpp
index 9f9321c..36d5c16 100644
--- a/gui/partitionlist.cpp
+++ b/gui/partitionlist.cpp
@@ -38,10 +38,8 @@
 #include <algorithm>
 
 extern "C" {
-#include "../common.h"
-#include "../roots.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -330,12 +328,12 @@
 			PartitionManager.Get_Partition_List(ListType, &mList);
 		} else {
 			mList.clear();
-			LOGE("No partition listtype name specified for partitionlist GUI element\n");
+			LOGERR("No partition listtype name specified for partitionlist GUI element\n");
 			return;
 		}
 	} else {
 		mList.clear();
-		LOGE("No partition listtype specified for partitionlist GUI element\n");
+		LOGERR("No partition listtype specified for partitionlist GUI element\n");
 		return;
 	}
 }
@@ -755,7 +753,7 @@
 					bool update_size = false;
 					TWPartition* Part = PartitionManager.Find_Partition_By_Path(str);
 					if (Part == NULL) {
-						LOGE("Unable to locate partition for '%s'\n", str.c_str());
+						LOGERR("Unable to locate partition for '%s'\n", str.c_str());
 						return 0;
 					}
 					if (!Part->Is_Mounted() && Part->Removable)
diff --git a/gui/progressbar.cpp b/gui/progressbar.cpp
index e0e9c51..dce4315 100644
--- a/gui/progressbar.cpp
+++ b/gui/progressbar.cpp
@@ -18,9 +18,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -39,7 +38,7 @@
 
     if (!node)
     {
-        LOGE("GUIProgressBar created without XML node\n");
+        LOGERR("GUIProgressBar created without XML node\n");
         return;
     }
 
diff --git a/gui/resources.cpp b/gui/resources.cpp
index 2f2ea95..aaa1533 100644
--- a/gui/resources.cpp
+++ b/gui/resources.cpp
@@ -21,9 +21,8 @@
 #include <iomanip>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -207,9 +206,9 @@
 
 				if (!attr_name) {
 					std::string res_name = attr_name->value();
-					LOGE("Resource (%s)-(%s) failed to load\n", type.c_str(), res_name.c_str());
+					LOGERR("Resource (%s)-(%s) failed to load\n", type.c_str(), res_name.c_str());
 				} else
-					LOGE("Resource type (%s) failed to load\n", type.c_str());
+					LOGERR("Resource type (%s) failed to load\n", type.c_str());
 
                 delete res;
             }
@@ -227,9 +226,9 @@
 
 				if (!attr_name) {
 					std::string res_name = attr_name->value();
-					LOGE("Resource (%s)-(%s) failed to load\n", type.c_str(), res_name.c_str());
+					LOGERR("Resource (%s)-(%s) failed to load\n", type.c_str(), res_name.c_str());
 				} else
-					LOGE("Resource type (%s) failed to load\n", type.c_str());
+					LOGERR("Resource type (%s) failed to load\n", type.c_str());
 
                 delete res;
             }
@@ -247,9 +246,9 @@
 
 				if (!attr_name) {
 					std::string res_name = attr_name->value();
-					LOGE("Resource (%s)-(%s) failed to load\n", type.c_str(), res_name.c_str());
+					LOGERR("Resource (%s)-(%s) failed to load\n", type.c_str(), res_name.c_str());
 				} else
-					LOGE("Resource type (%s) failed to load\n", type.c_str());
+					LOGERR("Resource type (%s) failed to load\n", type.c_str());
 
                 delete res;
             }
@@ -260,7 +259,7 @@
         }
         else
         {
-            LOGE("Resource type (%s) not supported.\n", type.c_str());
+            LOGERR("Resource type (%s) not supported.\n", type.c_str());
         }
 
         child = child->next_sibling("resource");
diff --git a/gui/slider.cpp b/gui/slider.cpp
index 95962c0..4542d60 100644
--- a/gui/slider.cpp
+++ b/gui/slider.cpp
@@ -19,9 +19,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
@@ -40,7 +39,7 @@
 
     if (!node)
     {
-        LOGE("GUISlider created without XML node\n");
+        LOGERR("GUISlider created without XML node\n");
         return;
     }
 
@@ -74,7 +73,7 @@
         sTouchH = gr_get_height(sTouch->GetResource()); // Height of the "touch image" that follows the touch (arrow)
     }
 
-    //LOGI("mRenderW: %i mTouchW: %i\n", mRenderW, mTouchW);
+    //LOGINFO("mRenderW: %i mTouchW: %i\n", mRenderW, mTouchW);
 	mActionX = mRenderX;
     mActionY = mRenderY;
     mActionW = mRenderW;
diff --git a/gui/text.cpp b/gui/text.cpp
index 1eceab1..46a6622 100644
--- a/gui/text.cpp
+++ b/gui/text.cpp
@@ -18,9 +18,8 @@
 #include <string>
 
 extern "C" {
-#include "../common.h"
+#include "../twcommon.h"
 #include "../minuitwrp/minui.h"
-#include "../recovery_ui.h"
 }
 
 #include "rapidxml.hpp"
