diff --git a/e107_core/templates/email_template.php b/e107_core/templates/email_template.php
index 62b99c528..99dc17ca6 100644
--- a/e107_core/templates/email_template.php
+++ b/e107_core/templates/email_template.php
@@ -98,7 +98,7 @@ $EMAIL_OVERRIDES = array(
 // Default - test email and when no template specified. 
 
 $EMAIL_TEMPLATE['default']['name']	 		= 'Default';
-$EMAIL_TEMPLATE['default']['subject']		= '{SUBJECT} {SITENAME}';
+$EMAIL_TEMPLATE['default']['subject']		= '{SITENAME}: {SUBJECT} ';
 $EMAIL_TEMPLATE['default']['header']		= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
 												<html xmlns='http://www.w3.org/1999/xhtml' >
 												<head>
@@ -143,7 +143,7 @@ $EMAIL_TEMPLATE['default']['footer']		= "<br /><br /><table cellspacing='4'>
  * signup.php?preview.aftersignup
  */
 $EMAIL_TEMPLATE['signup']['name']	 		= 'Signup';
-$EMAIL_TEMPLATE['signup']['subject']		= LAN_SIGNUP_96.' {SITENAME}';
+$EMAIL_TEMPLATE['signup']['subject']		= '{SITENAME}: '. LAN_SIGNUP_98;
 $EMAIL_TEMPLATE['signup']['header']			= $EMAIL_TEMPLATE['default']['header'];
 $EMAIL_TEMPLATE['signup']['body'] 			= "											
 												<div style='text-align:left'>
diff --git a/e107_handlers/db_debug_class.php b/e107_handlers/db_debug_class.php
index b45581796..0f05beaad 100644
--- a/e107_handlers/db_debug_class.php
+++ b/e107_handlers/db_debug_class.php
@@ -214,14 +214,14 @@ class e107_db_debug {
 
 
 
-	function Show_SQL_Details() {
+	function Show_SQL_Details($force=false) {
 		global $sql;
 		//
 		// Show stats from aSQLdetails array
 		//
-		if (!E107_DBG_SQLQUERIES && !E107_DBG_SQLDETAILS)
+		if (!E107_DBG_SQLQUERIES && !E107_DBG_SQLDETAILS  && ($force === false))
 		{
-			return FALSE;
+			return false;
 		}
 
 
@@ -498,11 +498,11 @@ class e107_db_debug {
 		$this->scbcount ++;
 	}
 
-	function Show_SC_BB()
+	function Show_SC_BB($force=false)
 	{
-		if (!E107_DBG_BBSC)
+		if (!E107_DBG_BBSC  && ($force === false))
 		{
-			return FALSE;
+			return false;
 		}
 
 		$text = "<table class='fborder table table-striped table-condensed' style='width: 100%'>
@@ -530,9 +530,9 @@ class e107_db_debug {
 		return $text;
 	}
 
-	function Show_PATH()
+	function Show_PATH($force=false)
 	{
-		if (!E107_DBG_PATH)
+		if (!E107_DBG_PATH && ($force === false))
 		{
 			return FALSE;
 		}
@@ -616,10 +616,11 @@ class e107_db_debug {
 	}
 
 
-	function Show_DEPRECATED(){
-		if (!E107_DBG_DEPRECATED)
+	function Show_DEPRECATED($force=false)
+	{
+		if (!E107_DBG_DEPRECATED  && ($force === false))
 		{
-			return FALSE;
+			return false;
 		} 
 		else 
 		{
@@ -703,9 +704,9 @@ class e107_db_debug {
 		return $text;
 	}
 	
-	function Show_Includes()
+	function Show_Includes($force=false)
 	{
-		if (!E107_DBG_INCLUDES) return FALSE;
+		if (!E107_DBG_INCLUDES  && ($force === false)) return false;
 
 		
         
diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php
index accff6b8c..7ea53e535 100644
--- a/e107_handlers/e107_class.php
+++ b/e107_handlers/e107_class.php
@@ -1333,7 +1333,7 @@ class e107
     /**
      * Retrieve date handler singleton object - preferred method. 
      *
-     * @return convert
+     * @return e107_db_debug
      */
     public static function getDebug() //XXX Discuss  - possible with current setup?
     {
@@ -3207,7 +3207,7 @@ class e107
 		define('e_ROOT',$e_ROOT);	
 
 		$this->relative_base_path = (!self::isCli()) ? $path : e_ROOT;
-		$this->http_path = "http://{$_SERVER['HTTP_HOST']}{$this->server_path}";
+		$this->http_path =  "http://{$_SERVER['HTTP_HOST']}{$this->server_path}";
 		$this->https_path = "https://{$_SERVER['HTTP_HOST']}{$this->server_path}";
 		$this->file_path = $path;
 
@@ -3389,6 +3389,13 @@ class e107
 		if(!deftrue('e_SINGLE_ENTRY'))
 		{
 			$page = substr(strrchr($_SERVER['PHP_SELF'], '/'), 1);
+
+			if(self::isCli() && !empty($_SERVER['_']))
+			{
+				$page = basename($_SERVER['_']);
+			}
+
+
 			define('e_PAGE', $page);
 			define('e_SELF', $_self);	
 		}
@@ -3492,14 +3499,15 @@ class e107
 
 		define('ADMINDIR', $ADMIN_DIRECTORY);
 
-		define('SITEURLBASE', $this->HTTP_SCHEME.'://'.$_SERVER['HTTP_HOST']);
 
 		if(self::isCli())
 		{
-			define('SITEURL', SITEURLBASE.$_SERVER['DOMAIN'].e_HTTP);
+			define('SITEURL', self::getPref('siteurl'));
+			define('SITEURLBASE', rtrim(SITEURL,'/'));
 		}
 		else
 		{
+			define('SITEURLBASE', $this->HTTP_SCHEME.'://'.$_SERVER['HTTP_HOST']);
 			define('SITEURL', SITEURLBASE.e_HTTP);
 		}
 
diff --git a/e107_handlers/mail_manager_class.php b/e107_handlers/mail_manager_class.php
index 8541732d5..42427d323 100644
--- a/e107_handlers/mail_manager_class.php
+++ b/e107_handlers/mail_manager_class.php
@@ -828,7 +828,7 @@ class e107MailManager
 			if ($email['mail_notify_complete'] & 2) // Do e107 notify
 			{	
 				require_once(e_HANDLER."notify_class.php");
-				notify_maildone($message);
+			//	notify_maildone($message); // FIXME
 			}
 			e107::getEvent()->trigger('maildone', $email);
 		}
diff --git a/e107_plugins/siteinfo/e_shortcode.php b/e107_plugins/siteinfo/e_shortcode.php
index 9ce62f247..7eea2f54b 100644
--- a/e107_plugins/siteinfo/e_shortcode.php
+++ b/e107_plugins/siteinfo/e_shortcode.php
@@ -35,8 +35,7 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
 
 		if(!empty($path))
 		{
-			$siteurl = $this->sc_siteurl();
-			return '<a href="'.$siteurl.'" class="sitebutton"><img src="'.$path.'" alt="'.SITENAME.'" /></a>';
+			return '<a href="'.SITEURL.'" class="sitebutton"><img src="'.$path.'" alt="'.SITENAME.'" /></a>';
 		}
 	}
 
@@ -62,8 +61,7 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
 
 	function sc_sitename($parm='')
 	{
-		$url = $this->sc_siteurl();
-		return ($parm == 'link') ? "<a href='".$url."' title='".SITENAME."'>".SITENAME."</a>" : SITENAME;
+		return ($parm == 'link') ? "<a href='".SITEURL."' title='".SITENAME."'>".SITENAME."</a>" : SITENAME;
 	}
 
 	function sc_sitedescription()