diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php
index 5b3f54a..3e2b99d 100644
--- a/system/codeigniter/CodeIgniter.php
+++ b/system/codeigniter/CodeIgniter.php
@@ -125,9 +125,16 @@
 	require(BASEPATH.'codeigniter/Base5'.EXT);
 }
 
+// Load the base controller class
 load_class('Controller', FALSE);
 
-require(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT);
+// Load the local application controller
+// Note: The Router class automatically validates the controller path.  If this include fails it 
+// means that the default controller in the Routes.php file is not resolving to something valid.
+if ( ! @include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT))
+{
+	show_error('Unable to load your default controller.  Please make sure the controller specified in your Routes.php file is valid.');
+}
 
 // Set a mark point for benchmarking
 $BM->mark('loading_time_base_classes_end');
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index 84b096c..fdef5dd 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -45,7 +45,7 @@
 	 *
 	 * @access	public
 	 */
-	function CI_Calendar()
+	function CI_Calendar($config = array())
 	{		
 		$this->CI =& get_instance();
 		
@@ -55,6 +55,12 @@
 		}
 
 		$this->local_time = time();
+		
+		if (count($config) > 0)
+		{
+			$this->initialize($config);
+		}
+		
 		log_message('debug', "Calendar Class Initialized");
 	}
 	
@@ -153,6 +159,9 @@
 		// "previous" month link
 		if ($this->show_next_prev == TRUE)
 		{
+			// Add a trailing slash to the  URL if needed
+			$this->next_prev_url = preg_replace("/(.+?)\/*$/", "\\1/",  $this->next_prev_url);
+		
 			$adjusted_date = $this->adjust_date($month - 1, $year);
 			$out .= str_replace('{previous_url}', $this->next_prev_url.$adjusted_date['year'].'/'.$adjusted_date['month'], $this->temp['heading_previous_cell']);
 			$out .= "\n";
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index c66d570..07ad6a6 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -120,8 +120,11 @@
 		if ($CI->uri->segment($this->uri_segment) != 0)
 		{
 			$this->cur_page = $CI->uri->segment($this->uri_segment);
+			
+			// Prep the current page - no funny business!
+			$this->cur_page = preg_replace("/[a-z\-]/", "", $this->cur_page);
 		}
-		
+				
 		if ( ! is_numeric($this->cur_page))
 		{
 			$this->cur_page = 0;