diff --git a/partition.cpp b/partition.cpp
index 5217227..27f855e 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -683,7 +683,6 @@
 	int index = 0;
 
 	Full_Filename = restore_folder + "/" + Backup_FileName;
-	LOGI("Full_Filename: '%s'\n", Full_Filename.c_str());
 	if (!TWFunc::Path_Exists(Full_Filename)) {
 		// This is a split archive, we presume
 		sprintf(split_filename, "%s%03i", Full_Filename.c_str(), index);
@@ -694,8 +693,8 @@
 			}
 			index++;
 			sprintf(split_filename, "%s%03i", Full_Filename.c_str(), index);
-			LOGI("Full_Filename: '%s'\n", Full_Filename.c_str());
 		}
+		return true;
 	} else {
 		// Single file archive
 		if (TWFunc::Check_MD5(Full_Filename) == 0) {
@@ -708,7 +707,6 @@
 }
 
 bool TWPartition::Restore(string restore_folder) {
-	ui_print("Restoring %s...\n", Display_Name.c_str());
 	if (Backup_Method == FILES)
 		return Restore_Tar(restore_folder);
 	else if (Backup_Method == DD)
@@ -995,9 +993,11 @@
 }
 
 bool TWPartition::Backup_Tar(string backup_folder) {
-	char back_name[255];
-	string Full_FileName, Tar_Args, Command;
-	int use_compression;
+	char back_name[255], split_index[5];
+	string Full_FileName, Split_FileName, Tar_Args, Command;
+	int use_compression, index, backup_count;
+	struct stat st;
+	unsigned long long total_bsize = 0;
 
 	if (!Mount(true))
 		return false;
@@ -1013,12 +1013,33 @@
 	sprintf(back_name, "%s.%s.win", Backup_Name.c_str(), Current_File_System.c_str());
 	Backup_FileName = back_name;
 
-	Full_FileName = backup_folder + "/" + Backup_FileName;
 	if (Backup_Size > MAX_ARCHIVE_SIZE) {
 		// This backup needs to be split into multiple archives
-		LOGE("Multiple archive splitting is not implemented yet!\n");
-		return false;
+		ui_print("Breaking backup file into multiple archives...\nGenerating file lists\n");
+		sprintf(back_name, "%s", Mount_Point.c_str());
+		backup_count = make_file_list(back_name);
+		if (backup_count < 1) {
+			LOGE("Error generating file list!\n");
+			return false;
+		}
+		for (index=0; index<backup_count; index++) {
+			sprintf(split_index, "%03i", index);
+			Full_FileName = backup_folder + "/" + Backup_FileName + split_index;
+			Command = "tar " + Tar_Args + " -f '" + Full_FileName + "' -T /tmp/list/filelist" + split_index;
+			LOGI("Backup command: '%s'\n", Command.c_str());
+			ui_print("Backup archive %i of %i...\n", (index + 1), backup_count);
+			system(Command.c_str()); // sending backup command formed earlier above
+
+			if (stat(Full_FileName.c_str(), &st) != 0 || st.st_size == 0) {
+				LOGE("File size is zero bytes. Aborting...\n\n"); // oh noes! file size is 0, abort! abort!
+				return false;
+			}
+			total_bsize += st.st_size;
+		}
+		ui_print(" * Total size: %llu bytes.\n", total_bsize);
+		system("cd /tmp && rm -rf list");
 	} else {
+		Full_FileName = backup_folder + "/" + Backup_FileName;
 		if (Has_Data_Media)
 			Command = "cd " + Mount_Point + " && tar " + Tar_Args + " ./ --exclude='media*' -f '" + Full_FileName + "'";
 		else
@@ -1068,6 +1089,8 @@
 bool TWPartition::Restore_Tar(string restore_folder) {
 	size_t first_period, second_period;
 	string Restore_File_System, Full_FileName, Command;
+	int index = 0;
+	char split_index[5];
 
 	LOGI("Restore filename is: %s\n", Backup_FileName.c_str());
 
@@ -1093,12 +1116,26 @@
 	if (!Mount(true))
 		return false;
 
-	Full_FileName = restore_folder + "/" + Backup_FileName;
 	ui_print("Restoring %s...\n", Display_Name.c_str());
+	Full_FileName = restore_folder + "/" + Backup_FileName;
 	if (!TWFunc::Path_Exists(Full_FileName)) {
-		// This backup is multiple archives
-		LOGE("Multiple archive not implemented yet.\n");
-		return false;
+		// Backup is multiple archives
+		LOGI("Backup is multiple archives.\n");
+		sprintf(split_index, "%03i", index);
+		Full_FileName = restore_folder + "/" + Backup_FileName + split_index;
+		while (TWFunc::Path_Exists(Full_FileName)) {
+			ui_print("Restoring archive %i...\n", index + 1);
+			Command = "cd " + Mount_Point + " && tar -xf '" + Full_FileName + "'";
+			LOGI("Restore command: '%s'\n", Command.c_str());
+			system(Command.c_str());
+			index++;
+			sprintf(split_index, "%03i", index);
+			Full_FileName = restore_folder + "/" + Backup_FileName + split_index;
+		}
+		if (index == 0) {
+			LOGE("Error locating restore file: '%s'\n", Full_FileName.c_str());
+			return false;
+		}
 	} else {
 		Command = "cd " + Mount_Point + " && tar -xf '" + Full_FileName + "'";
 		LOGI("Restore command: '%s'\n", Command.c_str());
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index a166783..855b311 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -334,21 +334,19 @@
 	char command[512];
 	string Full_File = Backup_Folder + Backup_Filename;
 
-	if (!generate_md5) {
-		LOGI("MD5 disabled\n");
+	if (!generate_md5)
 		return true;
-	}
 
-	ui_print(" * Generating md5...\n");
+	ui_print(" * Generating md5...");
 
 	if (TWFunc::Path_Exists(Full_File)) {
 		sprintf(command, "cd '%s' && md5sum %s > %s.md5",Backup_Folder.c_str(), Backup_Filename.c_str(), Backup_Filename.c_str());
 		LOGI("MD5 command is: '%s'\n", command);
 		if (system(command) == 0) {
-			ui_print("....MD5 Created.\n");
+			ui_print("MD5 Created.\n");
 			return true;
 		} else {
-			ui_print("....MD5 Error.\n");
+			ui_print("MD5 Error!\n");
 			return false;
 		}
 	} else {
@@ -356,21 +354,21 @@
 		int index = 0;
 
 		sprintf(filename, "%s%03i", Full_File.c_str(), index);
-		while (TWFunc::Path_Exists(filename)) {
+		while (TWFunc::Path_Exists(filename) == true) {
 			sprintf(command, "cd '%s' && md5sum %s%03i > %s%03i.md5",Backup_Folder.c_str(), Backup_Filename.c_str(), index, Backup_Filename.c_str(), index);
 			LOGI("MD5 command is: '%s'\n", command);
-			if (system(command) == 0) {
-				ui_print("....MD5 Created.\n");
-			} else {
-				ui_print("....MD5 Error.\n");
+			if (system(command) != 0) {
+				ui_print("MD5 Error.\n");
 				return false;
 			}
 			index++;
+			sprintf(filename, "%s%03i", Full_File.c_str(), index);
 		}
 		if (index == 0) {
 			LOGE("Backup file: '%s' not found!\n", filename);
 			return false;
 		}
+		ui_print("MD5 Created.\n");
 	}
 	return true;
 }
@@ -427,10 +425,9 @@
 		return false;
 
 	DataManager::GetValue(TW_SKIP_MD5_GENERATE_VAR, do_md5);
-	if (do_md5 != 0) {
-		LOGI("MD5 creation enabled.\n");
+	if (do_md5 == 0)
 		do_md5 = true;
-	}
+
 	DataManager::GetValue(TW_BACKUPS_FOLDER_VAR, Backup_Folder);
 	DataManager::GetValue(TW_BACKUP_NAME, Backup_Name);
 	if (Backup_Name == "(Current Date)" || Backup_Name == "0") {
@@ -663,192 +660,178 @@
     return true;
 }
 
+bool TWPartitionManager::Restore_Partition(TWPartition* Part, string Restore_Name) {
+	time_t Start, Stop;
+	time(&Start);
+	if (!Part->Restore(Restore_Name))
+		return false;
+	time(&Stop);
+	ui_print("[%s done (%d seconds)]\n\n", Part->Display_Name.c_str(), (int)difftime(Stop, Start));
+	return true;
+}
+
 int TWPartitionManager::Run_Restore(string Restore_Name) {
-	int check, restore_sys, restore_data, restore_cache, restore_boot, restore_andsec, restore_sdext, restore_sp1, restore_sp2, restore_sp3;
-	TWPartition* Part;
+	int check_md5, check, partition_count = 0;
+	TWPartition* restore_sys = NULL;
+	TWPartition* restore_data = NULL;
+	TWPartition* restore_cache = NULL;
+	TWPartition* restore_boot = NULL;
+	TWPartition* restore_andsec = NULL;
+	TWPartition* restore_sdext = NULL;
+	TWPartition* restore_sp1 = NULL;
+	TWPartition* restore_sp2 = NULL;
+	TWPartition* restore_sp3 = NULL;
+	time_t rStart, rStop;
+	time(&rStart);
 
-	DataManager::GetValue(TW_SKIP_MD5_CHECK_VAR, check);
-	DataManager::GetValue(TW_RESTORE_SYSTEM_VAR, restore_sys);
-	DataManager::GetValue(TW_RESTORE_DATA_VAR, restore_data);
-	DataManager::GetValue(TW_RESTORE_CACHE_VAR, restore_cache);
-	DataManager::GetValue(TW_RESTORE_BOOT_VAR, restore_boot);
-	DataManager::GetValue(TW_RESTORE_ANDSEC_VAR, restore_andsec);
-	DataManager::GetValue(TW_RESTORE_SDEXT_VAR, restore_sdext);
-	DataManager::GetValue(TW_RESTORE_SP1_VAR, restore_sp1);
-	DataManager::GetValue(TW_RESTORE_SP2_VAR, restore_sp2);
-	DataManager::GetValue(TW_RESTORE_SP3_VAR, restore_sp3);
+	ui_print("\n[RESTORE STARTED]\n\n");
+	ui_print("Restore folder: '%s'\n", Restore_Name.c_str());
 
+	if (!Mount_Current_Storage(true))
+		return false;
+
+	DataManager::GetValue(TW_SKIP_MD5_CHECK_VAR, check_md5);
+	DataManager::GetValue(TW_RESTORE_SYSTEM_VAR, check);
 	if (check > 0) {
+		restore_sys = Find_Partition_By_Path("/system");
+		if (restore_sys == NULL) {
+			LOGE("Unable to locate system partition.\n");
+			return false;
+		}
+		partition_count++;
+	}
+	DataManager::GetValue(TW_RESTORE_DATA_VAR, check);
+	if (check > 0) {
+		restore_data = Find_Partition_By_Path("/data");
+		if (restore_data == NULL) {
+			LOGE("Unable to locate data partition.\n");
+			return false;
+		}
+		partition_count++;
+	}
+	DataManager::GetValue(TW_RESTORE_CACHE_VAR, check);
+	if (check > 0) {
+		restore_cache = Find_Partition_By_Path("/cache");
+		if (restore_cache == NULL) {
+			LOGE("Unable to locate cache partition.\n");
+			return false;
+		}
+		partition_count++;
+	}
+	DataManager::GetValue(TW_RESTORE_BOOT_VAR, check);
+	if (check > 0) {
+		restore_boot = Find_Partition_By_Path("/boot");
+		if (restore_boot == NULL) {
+			LOGE("Unable to locate boot partition.\n");
+			return false;
+		}
+		partition_count++;
+	}
+	DataManager::GetValue(TW_RESTORE_ANDSEC_VAR, check);
+	if (check > 0) {
+		restore_andsec = Find_Partition_By_Path("/and-sec");
+		if (restore_andsec == NULL) {
+			LOGE("Unable to locate android secure partition.\n");
+			return false;
+		}
+		partition_count++;
+	}
+	DataManager::GetValue(TW_RESTORE_SDEXT_VAR, check);
+	if (check > 0) {
+		restore_sdext = Find_Partition_By_Path("/sd-ext");
+		if (restore_sdext == NULL) {
+			LOGE("Unable to locate sd-ext partition.\n");
+			return false;
+		}
+		partition_count++;
+	}
+#ifdef SP1_NAME
+	DataManager::GetValue(TW_RESTORE_SP1_VAR, check);
+	if (check > 0) {
+		restore_sp1 = Find_Partition_By_Path(SP1_NAME);
+		if (restore_sp1 == NULL) {
+			LOGE("Unable to locate %s partition.\n", SP1_NAME);
+			return false;
+		}
+		partition_count++;
+	}
+#endif
+#ifdef SP2_NAME
+	DataManager::GetValue(TW_RESTORE_SP2_VAR, check);
+	if (check > 0) {
+		restore_sp2 = Find_Partition_By_Path(SP2_NAME);
+		if (restore_sp2 == NULL) {
+			LOGE("Unable to locate %s partition.\n", SP2_NAME);
+			return false;
+		}
+		partition_count++;
+	}
+#endif
+#ifdef SP3_NAME
+	DataManager::GetValue(TW_RESTORE_SP3_VAR, check);
+	if (check > 0) {
+		restore_sp3 = Find_Partition_By_Path(SP3_NAME);
+		if (restore_sp3 == NULL) {
+			LOGE("Unable to locate %s partition.\n", SP3_NAME);
+			return false;
+		}
+		partition_count++;
+	}
+#endif
+
+	if (partition_count == 0) {
+		LOGE("No partitions selected for restore.\n");
+		return false;
+	}
+
+	if (check_md5 > 0) {
 		// Check MD5 files first before restoring to ensure that all of them match before starting a restore
-		if (restore_sys > 0) {
-			Part = Find_Partition_By_Path("/system");
-			if (Part) {
-				if (!Part->Check_MD5(Restore_Name))
-					return false;
-			} else
-				LOGE("Restore: Unable to locate system partition.\n");
-		}
+		ui_print("Verifying MD5...\n");
+		if (restore_sys != NULL && !restore_sys->Check_MD5(Restore_Name))
+			return false;
+		if (restore_data != NULL && !restore_data->Check_MD5(Restore_Name))
+			return false;
+		if (restore_cache != NULL && !restore_cache->Check_MD5(Restore_Name))
+			return false;
+		if (restore_boot != NULL && !restore_boot->Check_MD5(Restore_Name))
+			return false;
+		if (restore_andsec != NULL && !restore_andsec->Check_MD5(Restore_Name))
+			return false;
+		if (restore_sdext != NULL && !restore_sdext->Check_MD5(Restore_Name))
+			return false;
+		if (restore_sp1 != NULL && !restore_sp1->Check_MD5(Restore_Name))
+			return false;
+		if (restore_sp2 != NULL && !restore_sp2->Check_MD5(Restore_Name))
+			return false;
+		if (restore_sp3 != NULL && !restore_sp3->Check_MD5(Restore_Name))
+			return false;
+		ui_print("Done verifying MD5.\n");
+	} else
+			ui_print("Skipping MD5 check based on user setting.\n");
 
-		if (restore_data > 0) {
-			Part = Find_Partition_By_Path("/data");
-			if (Part) {
-				if (!Part->Check_MD5(Restore_Name))
-					return false;
-			} else
-				LOGE("Restore: Unable to locate data partition.\n");
-		}
+	ui_print("Restoring %i partitions...\n", partition_count);
+	if (restore_sys != NULL && !Restore_Partition(restore_sys, Restore_Name))
+		return false;
+	if (restore_data != NULL && !Restore_Partition(restore_data, Restore_Name))
+		return false;
+	if (restore_cache != NULL && !Restore_Partition(restore_cache, Restore_Name))
+		return false;
+	if (restore_boot != NULL && !Restore_Partition(restore_boot, Restore_Name))
+		return false;
+	if (restore_andsec != NULL && !Restore_Partition(restore_andsec, Restore_Name))
+		return false;
+	if (restore_sdext != NULL && !Restore_Partition(restore_sdext, Restore_Name))
+		return false;
+	if (restore_sp1 != NULL && !Restore_Partition(restore_sp1, Restore_Name))
+		return false;
+	if (restore_sp2 != NULL && !Restore_Partition(restore_sp2, Restore_Name))
+		return false;
+	if (restore_sp3 != NULL && !Restore_Partition(restore_sp3, Restore_Name))
+		return false;
 
-		if (restore_cache > 0) {
-			Part = Find_Partition_By_Path("/cache");
-			if (Part) {
-				if (!Part->Check_MD5(Restore_Name))
-					return false;
-			} else
-				LOGE("Restore: Unable to locate cache partition.\n");
-		}
-
-		if (restore_boot > 0) {
-			Part = Find_Partition_By_Path("/boot");
-			if (Part) {
-				if (!Part->Check_MD5(Restore_Name))
-					return false;
-			} else
-				LOGE("Restore: Unable to locate boot partition.\n");
-		}
-
-		if (restore_andsec > 0) {
-			Part = Find_Partition_By_Path("/.android_secure");
-			if (Part) {
-				if (!Part->Check_MD5(Restore_Name))
-					return false;
-			} else
-				LOGE("Restore: Unable to locate android_secure partition.\n");
-		}
-
-		if (restore_sdext > 0) {
-			Part = Find_Partition_By_Path("/sd-ext");
-			if (Part) {
-				if (!Part->Check_MD5(Restore_Name))
-					return false;
-			} else
-				LOGE("Restore: Unable to locate sd-ext partition.\n");
-		}
-#ifdef SP1_NAME
-		if (restore_sp1 > 0) {
-			Part = Find_Partition_By_Path(TWFunc::Get_Root_Path(SP1_NAME));
-			if (Part) {
-				if (!Part->Check_MD5(Restore_Name))
-					return false;
-			} else
-				LOGE("Restore: Unable to locate %s partition.\n", SP1_NAME);
-		}
-#endif
-#ifdef SP2_NAME
-		if (restore_sp2 > 0) {
-			Part = Find_Partition_By_Path(TWFunc::Get_Root_Path(SP2_NAME));
-			if (Part) {
-				if (!Part->Check_MD5(Restore_Name))
-					return false;
-			} else
-				LOGE("Restore: Unable to locate %s partition.\n", SP2_NAME);
-		}
-#endif
-#ifdef SP3_NAME
-		if (restore_sp3 > 0) {
-			Part = Find_Partition_By_Path(TWFunc::Get_Root_Path(SP3_NAME));
-			if (Part) {
-				if (!Part->Check_MD5(Restore_Name))
-					return false;
-			} else
-				LOGE("Restore: Unable to locate %s partition.\n", SP3_NAME);
-		}
-#endif
-	}
-
-	if (restore_sys > 0) {
-		Part = Find_Partition_By_Path("/system");
-		if (Part) {
-			if (!Part->Restore(Restore_Name))
-				return false;
-		} else
-			LOGE("Restore: Unable to locate system partition.\n");
-	}
-
-	if (restore_data > 0) {
-		Part = Find_Partition_By_Path("/data");
-		if (Part) {
-			if (!Part->Restore(Restore_Name))
-				return false;
-		} else
-			LOGE("Restore: Unable to locate data partition.\n");
-	}
-
-	if (restore_cache > 0) {
-		Part = Find_Partition_By_Path("/cache");
-		if (Part) {
-			if (!Part->Restore(Restore_Name))
-				return false;
-		} else
-			LOGE("Restore: Unable to locate cache partition.\n");
-	}
-
-	if (restore_boot > 0) {
-		Part = Find_Partition_By_Path("/boot");
-		if (Part) {
-			if (!Part->Restore(Restore_Name))
-				return false;
-		} else
-			LOGE("Restore: Unable to locate boot partition.\n");
-	}
-
-	if (restore_andsec > 0) {
-		Part = Find_Partition_By_Path("/.android_secure");
-		if (Part) {
-			if (!Part->Restore(Restore_Name))
-				return false;
-		} else
-			LOGE("Restore: Unable to locate android_secure partition.\n");
-	}
-
-	if (restore_sdext > 0) {
-		Part = Find_Partition_By_Path("/sd-ext");
-		if (Part) {
-			if (!Part->Restore(Restore_Name))
-				return false;
-		} else
-			LOGE("Restore: Unable to locate sd-ext partition.\n");
-	}
-#ifdef SP1_NAME
-	if (restore_sp1 > 0) {
-		Part = Find_Partition_By_Path(TWFunc::Get_Root_Path(SP1_NAME));
-		if (Part) {
-			if (!Part->Restore(Restore_Name))
-				return false;
-		} else
-			LOGE("Restore: Unable to locate %s partition.\n", SP1_NAME);
-	}
-#endif
-#ifdef SP2_NAME
-	if (restore_sp2 > 0) {
-		Part = Find_Partition_By_Path(TWFunc::Get_Root_Path(SP2_NAME));
-		if (Part) {
-			if (!Part->Restore(Restore_Name))
-				return false;
-		} else
-			LOGE("Restore: Unable to locate %s partition.\n", SP2_NAME);
-	}
-#endif
-#ifdef SP3_NAME
-	if (restore_sp3 > 0) {
-		Part = Find_Partition_By_Path(TWFunc::Get_Root_Path(SP3_NAME));
-		if (Part) {
-			if (!Part->Restore(Restore_Name))
-				return false;
-		} else
-			LOGE("Restore: Unable to locate %s partition.\n", SP3_NAME);
-	}
-#endif
 	Update_System_Details();
+	time(&rStop);
+	ui_print("[RESTORE COMPLETED IN %d SECONDS]\n\n",(int)difftime(rStop,rStart));
 	return true;
 }
 
@@ -1247,4 +1230,4 @@
 	__system("./sbin/fix_permissions.sh");
 	ui_print("Done.\n\n");
 	return true;
-}
\ No newline at end of file
+}
diff --git a/partitions.hpp b/partitions.hpp
index 36138d1..ada2f33 100644
--- a/partitions.hpp
+++ b/partitions.hpp
@@ -174,6 +174,7 @@
 private:
 	bool Make_MD5(bool generate_md5, string Backup_Folder, string Backup_Filename); // Generates an MD5 after a backup is made
 	bool Backup_Partition(TWPartition* Part, string Backup_Folder, bool generate_md5, unsigned long long* img_bytes_remaining, unsigned long long* file_bytes_remaining, unsigned long *img_time, unsigned long *file_time);
+	bool Restore_Partition(TWPartition* Part, string Restore_Name);
 
 private:
 	std::vector<TWPartition*> Partitions;                                     // Vector list of all partitions
