Index: Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs
===================================================================
--- Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs	(revision 1062)
+++ Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs	(revision 1065)
@@ -273,5 +273,5 @@
 			 * TEST EXCEPTION -- REMOVE AFTER TESTING
 			 */
-			//throw new Exception("Simulated Uncaught Exception");
+            // throw new Exception("Simulated Uncaught Exception");
 			/*
 			 * TEST EXCEPTION -- REMOVE AFTER TESTING
@@ -398,4 +398,8 @@
 		}
 
+        /// <summary>
+        /// Refreshes Availablility and Schedules from RPMS.
+        /// </summary>
+        /// <returns>Success or Failure. Should be always Success.</returns>
 		private bool RefreshSchedule()
 		{
@@ -586,4 +590,5 @@
 			//TODO:  Test that resource is not currently in list, that it IS a resource, etc
 			this.m_sResourcesArray.Add(sResource);
+            //UpdateAllViews: Redraws all the open views. But does not call server.
 			this.UpdateAllViews();
 		}
Index: Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
===================================================================
--- Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs	(revision 1062)
+++ Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs	(revision 1065)
@@ -173,4 +173,9 @@
             AttachConsole(ATTACH_PARENT_PROCESS);
 #endif
+
+#if TRACE
+            DateTime startLoadTime = DateTime.Now;
+#endif
+
             //Store a class instance of manager. Actual constructor does nothing.
             _current = new CGDocumentManager();
@@ -197,7 +202,39 @@
             doc.OnNewDocument();
             Application.DoEvents();
+#if TRACE
+            DateTime EndLoadTime = DateTime.Now;
+            TimeSpan LoadTime = EndLoadTime - startLoadTime;
+            Debug.Write("Load Time for GUI is " + LoadTime.Seconds + " s & " + LoadTime.Milliseconds + " ms\n");
+#endif
+            //Application wide error handler for unhandled errors
+            Application.ThreadException += new ThreadExceptionEventHandler(App_ThreadException);
 
             //Run the application
+            //Sam's Note: This is an unusual way to call this. Typically, it's run with
+            //the main form as an argument.
             Application.Run();
+        }
+
+        /// <summary>
+        /// Exception handler for application errors. TODO: Test
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        static void App_ThreadException(object sender, ThreadExceptionEventArgs e)
+        {
+            if (e.Exception is System.Net.Sockets.SocketException)
+            {
+                MessageBox.Show("Looks like we lost our connection with the server\nClick OK to terminate the application.");
+                Application.Exit();
+            }
+
+            string msg = "A problem has occured in this applicaton. \r\n\r\n" +
+                "\t" + e.Exception.Message + "\r\n\r\n" +
+                "Would you like to continue the application?";
+
+            DialogResult res = MessageBox.Show(msg, "Unexpected Error", MessageBoxButtons.YesNo);
+
+            if (res == DialogResult.Yes) return;
+            else Application.Exit();
         }
 
Index: Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs
===================================================================
--- Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs	(revision 1062)
+++ Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs	(revision 1065)
@@ -88,4 +88,10 @@
             this.m_sfHour.Alignment = StringAlignment.Far;
             this.m_bInitialUpdate = false;
+            this.MouseEnter += new EventHandler(CalendarGrid_MouseEnter);
+        }
+
+        void CalendarGrid_MouseEnter(object sender, EventArgs e)
+        {
+            this.Focus();
         }
 
Index: Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj
===================================================================
--- Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj	(revision 1062)
+++ Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj	(revision 1065)
@@ -35,5 +35,5 @@
     </SccProvider>
     <OldToolsVersion>3.5</OldToolsVersion>
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <ManifestCertificateThumbprint>3202DD11CA9F64F7E52CF7BBED5F17D6E8A1B395</ManifestCertificateThumbprint>
Index: Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.sln
===================================================================
--- Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.sln	(revision 1062)
+++ Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.sln	(revision 1065)
@@ -17,6 +17,6 @@
 		{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.ActiveCfg = Debug|Any CPU
-		{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.Build.0 = Debug|Any CPU
+		{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
