Index: branches/eraser6/Eraser/UpdateForm.cs
===================================================================
--- branches/eraser6/Eraser/UpdateForm.cs	(revision 864)
+++ branches/eraser6/Eraser/UpdateForm.cs	(revision 903)
@@ -87,5 +87,5 @@
 			{
 				updates.OnProgressEvent += updateListDownloader_ProgressChanged;
-				updates.GetUpdates();
+				updates.DownloadUpdateList();
 			}
 			finally
@@ -107,6 +107,6 @@
 					throw new OperationCanceledException();
 
-				Invoke(new UpdateManager.ProgressEventFunction(updateListDownloader_ProgressChanged),
-					sender, e);
+				Invoke(new EventHandler<UpdateManager.ProgressEventArgs>(
+					updateListDownloader_ProgressChanged), sender, e);
 				return;
 			}
@@ -306,5 +306,5 @@
 					throw new OperationCanceledException();
 
-				Invoke(new UpdateManager.ProgressEventFunction(downloader_ProgressChanged),
+				Invoke(new EventHandler<UpdateManager.ProgressEventArgs>(downloader_ProgressChanged),
 					sender, e);
 				return;
@@ -312,5 +312,4 @@
 
 			UpdateData update = uiUpdates[(UpdateManager.Update)e.UserState];
-			long amountLeft = (long)((1 - e.ProgressPercentage) * update.Update.FileSize);
 
 			if (e is UpdateManager.ProgressErrorEventArgs)
@@ -415,5 +414,5 @@
 					throw new OperationCanceledException();
 
-				Invoke(new UpdateManager.ProgressEventFunction(installer_ProgressChanged),
+				Invoke(new EventHandler<UpdateManager.ProgressEventArgs>(installer_ProgressChanged),
 					sender, e);
 				return;
@@ -480,6 +479,4 @@
 				Update = update;
 				LVItem = item;
-				amountDownloaded = 0;
-				Error = null;
 			}
 
@@ -527,4 +524,5 @@
 		{
 			public Mirror(string location, string link)
+				: this()
 			{
 				Location = location;
@@ -535,10 +533,18 @@
 			/// The location where the mirror is at.
 			/// </summary>
-			public string Location;
+			public string Location
+			{
+				get;
+				set;
+			}
 
 			/// <summary>
 			/// The URL prefix to utilise the mirror.
 			/// </summary>
-			public string Link;
+			public string Link
+			{
+				get;
+				set;
+			}
 
 			public override string ToString()
@@ -648,11 +654,11 @@
 		/// Retrieves the update list from the server.
 		/// </summary>
-		public void GetUpdates()
+		public void DownloadUpdateList()
 		{
 			WebRequest.DefaultCachePolicy = new HttpRequestCachePolicy(
 				HttpRequestCacheLevel.Refresh);
 			HttpWebRequest req = (HttpWebRequest)
-				WebRequest.Create("http://eraser.heidi.ie/updates?action=listupdates&" +
-					"version=" + Assembly.GetExecutingAssembly().GetName().Version.ToString());
+				WebRequest.Create(new Uri("http://eraser.heidi.ie/updates?action=listupdates&" +
+					"version=" + Assembly.GetExecutingAssembly().GetName().Version.ToString()));
 			
 			using (WebResponse resp = req.GetResponse())
@@ -781,5 +787,5 @@
 		/// <param name="updates">The updates to retrieve and install.</param>
 		/// <returns>An opaque object for use with InstallUpdates.</returns>
-		public object DownloadUpdates(List<Update> updates)
+		public object DownloadUpdates(ICollection<Update> downloadQueue)
 		{
 			//Create a folder to hold all our updates.
@@ -789,5 +795,5 @@
 			int currUpdate = 0;
 			Dictionary<string, Update> tempFilesMap = new Dictionary<string, Update>();
-			foreach (Update update in updates)
+			foreach (Update update in downloadQueue)
 			{
 				try
@@ -800,5 +806,5 @@
 						reqUri = new Uri(update.Link);
 					else
-						reqUri = new Uri(new Uri(SelectedMirror.Link), update.Link);
+						reqUri = new Uri(new Uri(SelectedMirror.Link), new Uri(update.Link));
 					
 					//Then grab the download.
@@ -823,5 +829,5 @@
 								//Compute progress
 								float itemProgress = tempStrm.Position / (float)resp.ContentLength;
-								float overallProgress = (currUpdate - 1 + itemProgress) / updates.Count;
+								float overallProgress = (currUpdate - 1 + itemProgress) / downloadQueue.Count;
 								OnProgress(new ProgressEventArgs(itemProgress, overallProgress,
 									update, S._("Downloading: {0}", update.Name)));
@@ -833,5 +839,5 @@
 
 						//Let the event handler know the download is complete.
-						OnProgress(new ProgressEventArgs(1.0f, (float)currUpdate / updates.Count,
+						OnProgress(new ProgressEventArgs(1.0f, (float)currUpdate / downloadQueue.Count,
 							update, S._("Downloaded: {0}", update.Name)));
 					}
@@ -840,5 +846,5 @@
 				{
 					OnProgress(new ProgressErrorEventArgs(new ProgressEventArgs(1.0f,
-						(float)currUpdate / updates.Count, update,
+						(float)currUpdate / downloadQueue.Count, update,
 							S._("Error downloading {0}: {1}", update.Name, e.Message)),
 						e));
@@ -849,7 +855,7 @@
 		}
 
-		public void InstallUpdates(object downloadObject)
-		{
-			Dictionary<string, Update> tempFiles = (Dictionary<string, Update>)downloadObject;
+		public void InstallUpdates(object value)
+		{
+			Dictionary<string, Update> tempFiles = (Dictionary<string, Update>)value;
 			Dictionary<string, Update>.KeyCollection files = tempFiles.Keys;
 			int currItem = 0;
@@ -876,5 +882,5 @@
 						OnProgress(new ProgressErrorEventArgs(new ProgressEventArgs(1.0f,
 							progress, item, S._("Error installing {0}", item.Name)),
-							new Exception(S._("The installer exited with an error code {0}",
+							new ApplicationException(S._("The installer exited with an error code {0}",
 								process.ExitCode))));
 				}
@@ -898,15 +904,12 @@
 
 		/// <summary>
-		/// Prototype of the callback functions from this object.
-		/// </summary>
-		/// <param name="sender">The source of the event.</param>
-		/// <param name="arg">The ProgressEventArgs object holding information
-		/// about the progress of the current operation.</param>
-		public delegate void ProgressEventFunction(object sender, ProgressEventArgs arg);
-
-		/// <summary>
 		/// Called when the progress of the operation changes.
 		/// </summary>
-		public ProgressEventFunction OnProgressEvent;
+		public EventHandler<ProgressEventArgs> OnProgressEvent
+		{
+			get { return onProgressEvent; }
+			set { onProgressEvent = value; }
+		}
+		private EventHandler<ProgressEventArgs> onProgressEvent;
 
 		/// <summary>
@@ -956,5 +959,5 @@
 					}
 
-				throw new IndexOutOfRangeException();
+				throw new ArgumentException(S._("Unknown mirror selected."));
 			}
 		}
@@ -987,5 +990,5 @@
 		/// <param name="key">The category to retrieve.</param>
 		/// <returns>All updates in the given category.</returns>
-		public List<Update> this[string key]
+		public ICollection<Update> this[string key]
 		{
 			get
