diff --git a/gui/action.cpp b/gui/action.cpp
index 66ee5d6..344ced3 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -443,49 +443,29 @@
 		return 0;
 	}
 
-	if (function == "mount")
-	{
-		if (arg == "usb")
-		{
+	if (function == "mount") {
+		if (arg == "usb") {
 			DataManager::SetValue(TW_ACTION_BUSY, 1);
 			if (!simulate)
 				PartitionManager.usb_storage_enable();
 			else
 				gui_print("Simulating actions...\n");
-		}
-		else if (!simulate)
-		{
-			string cmd;
-			if (arg == "EXTERNAL")
-				PartitionManager.Mount_By_Path(DataManager::GetStrValue(TW_EXTERNAL_MOUNT), true);
-			else if (arg == "INTERNAL")
-				PartitionManager.Mount_By_Path(DataManager::GetStrValue(TW_INTERNAL_MOUNT), true);
-			else
-				PartitionManager.Mount_By_Path(arg, true);
+		} else if (!simulate) {
+			PartitionManager.Mount_By_Path(arg, true);
 		} else
 			gui_print("Simulating actions...\n");
 		return 0;
 	}
 
-	if (function == "umount" || function == "unmount")
-	{
-		if (arg == "usb")
-		{
+	if (function == "umount" || function == "unmount") {
+		if (arg == "usb") {
 			if (!simulate)
 				PartitionManager.usb_storage_disable();
 			else
 				gui_print("Simulating actions...\n");
 			DataManager::SetValue(TW_ACTION_BUSY, 0);
-		}
-		else if (!simulate)
-		{
-			string cmd;
-			if (arg == "EXTERNAL")
-				PartitionManager.UnMount_By_Path(DataManager::GetStrValue(TW_EXTERNAL_MOUNT), true);
-			else if (arg == "INTERNAL")
-				PartitionManager.UnMount_By_Path(DataManager::GetStrValue(TW_INTERNAL_MOUNT), true);
-			else
-				PartitionManager.UnMount_By_Path(arg, true);
+		} else if (!simulate) {
+			PartitionManager.UnMount_By_Path(arg, true);
 		} else
 			gui_print("Simulating actions...\n");
 		return 0;
@@ -605,57 +585,6 @@
 
 	if (function == "togglestorage") {
 		LOGERR("togglestorage action was deprecated from TWRP\n");
-		if (arg == "internal") {
-			DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 0);
-		} else if (arg == "external") {
-			DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 1);
-		}
-		if (PartitionManager.Mount_Current_Storage(true)) {
-			if (arg == "internal") {
-				string zip_path, zip_root;
-				DataManager::GetValue(TW_ZIP_INTERNAL_VAR, zip_path);
-				zip_root = TWFunc::Get_Root_Path(zip_path);
-#ifdef RECOVERY_SDCARD_ON_DATA
-	#ifndef TW_EXTERNAL_STORAGE_PATH
-				if (zip_root != "/sdcard")
-					DataManager::SetValue(TW_ZIP_INTERNAL_VAR, "/sdcard");
-	#else
-				if (strcmp(EXPAND(TW_EXTERNAL_STORAGE_PATH), "/sdcard") == 0) {
-					if (zip_root != "/emmc")
-						DataManager::SetValue(TW_ZIP_INTERNAL_VAR, "/emmc");
-				} else {
-					if (zip_root != "/sdcard")
-						DataManager::SetValue(TW_ZIP_INTERNAL_VAR, "/sdcard");
-				}
-	#endif
-#else
-				if (zip_root != DataManager::GetCurrentStoragePath())
-					DataManager::SetValue(TW_ZIP_LOCATION_VAR, DataManager::GetCurrentStoragePath());
-#endif
-				// Save the current zip location to the external variable
-				DataManager::SetValue(TW_ZIP_EXTERNAL_VAR, DataManager::GetStrValue(TW_ZIP_LOCATION_VAR));
-				// Change the current zip location to the internal variable
-				DataManager::SetValue(TW_ZIP_LOCATION_VAR, DataManager::GetStrValue(TW_ZIP_INTERNAL_VAR));
-			} else if (arg == "external") {
-				string zip_path, zip_root;
-				DataManager::GetValue(TW_ZIP_EXTERNAL_VAR, zip_path);
-				zip_root = TWFunc::Get_Root_Path(zip_path);
-				if (zip_root != DataManager::GetCurrentStoragePath()) {
-					DataManager::SetValue(TW_ZIP_EXTERNAL_VAR, DataManager::GetCurrentStoragePath());
-				}
-				// Save the current zip location to the internal variable
-				DataManager::SetValue(TW_ZIP_INTERNAL_VAR, DataManager::GetStrValue(TW_ZIP_LOCATION_VAR));
-				// Change the current zip location to the external variable
-				DataManager::SetValue(TW_ZIP_LOCATION_VAR, DataManager::GetStrValue(TW_ZIP_EXTERNAL_VAR));
-			}
-		} else {
-			// We weren't able to toggle for some reason, restore original setting
-			if (arg == "internal") {
-				DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 1);
-			} else if (arg == "external") {
-				DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 0);
-			}
-		}
 		return 0;
 	}
 	
diff --git a/gui/object.cpp b/gui/object.cpp
index 41cc822..543452c 100644
--- a/gui/object.cpp
+++ b/gui/object.cpp
@@ -190,10 +190,6 @@
 	FILE *fp;
 	char tmpOutput[255];
 
-	if (strcmp(vol.c_str(), "EXTERNAL") == 0)
-		DataManager::GetValue(TW_EXTERNAL_MOUNT, vol);
-	else if (strcmp(vol.c_str(), "INTERNAL") == 0)
-		DataManager::GetValue(TW_INTERNAL_MOUNT, vol);
 	fp = fopen("/proc/mounts", "rt");
 	while (fgets(tmpOutput,255,fp) != NULL)
 	{
