diff --git a/action.changeGroups.php b/action.changeGroups.php
index 413811761af757c4a3c541b2e06519284532a136..4d5fc2c489f741c5e0ae03f29f0be0c5754f7fa2 100644
--- a/action.changeGroups.php
+++ b/action.changeGroups.php
@@ -30,13 +30,13 @@ $smarty->assign('headline',$headline);
 if (isset($params['setMember']))  {
   $GroupID = $params['nonmembers'];
   Groups::setMember($ID,$GroupID);
-  Groups::setMailLists();
+  //Groups::setMailLists();   // Inactivated.
 }
 
 if (isset($params['unsetMember']))  {
   $GroupID = $params['members'];
   Groups::UnsetMember($ID,$GroupID);
-  Groups::setMailLists();
+  //Groups::setMailLists();  // Inactivated.
 }
 
 $members = Groups::getMembers($ID);
diff --git a/lib/class.Groups.php b/lib/class.Groups.php
index 1997ee7b332aa9eb7690fe25fbe9e99f96b14c25..39b1492f52863ad971d63478d94535630d63c594 100644
--- a/lib/class.Groups.php
+++ b/lib/class.Groups.php
@@ -88,7 +88,7 @@ EOS;
   }
  
   public function updateRecord() {
-    global $gCms; if (!isset($gCms)) exit;
+    //global $gCms; if (!isset($gCms)) exit;
     $db = AddressDB::getDB();
     if ($this->ID == '') { $this->createRecord(); }
 
@@ -135,7 +135,7 @@ EOS;
   /* } */
   
   public static function getMembers($GruppID) {
-    global $gCms; if (!isset($gCms)) exit;
+    //global $gCms; if (!isset($gCms)) exit;
     $db = AddressDB::getDB();
     $result = $db->Execute(self::$queryMembership,array($GruppID));
     if ($result === false) { die("Database error!<br>" . $db->ErrorMsg()); }
@@ -158,7 +158,7 @@ EOS;
   }
     
   public static function setMember($ID,$GroupID) {
-    global $gCms; if (!isset($gCms)) exit;
+    //global $gCms; if (!isset($gCms)) exit;
     $db = AddressDB::getDB();
     $values = array($ID, $GroupID);
     $result = $db->Execute(self::$querySetGroup,$values);
@@ -166,7 +166,7 @@ EOS;
   }  
 
   public static function unsetMember($ID,$GroupID) {
-    global $gCms; if (!isset($gCms)) exit;
+    //global $gCms; if (!isset($gCms)) exit;
     $db = AddressDB::getDB();
     $values = array($ID, $GroupID);
     //   echo '<pre>'; print_r($queryUnsetGroup); print_r($values); echo '</pre>';exit;
@@ -176,7 +176,9 @@ EOS;
   }  
 
   public static function setMailLists() {
-    global $gCms; if (!isset($gCms)) exit;
+    // This function should be inactivated.
+    return;
+    //global $gCms; if (!isset($gCms)) exit;
     $config =& $gCms->GetConfig();
     $maildir = $config['root_path'] . '/uploads/mailinglists';
     $db = AddressDB::getDB();
@@ -190,22 +192,22 @@ EOS;
       $result = $db->Execute(self::$queryMail,$values);
       if ($result === false) { die("Database error!<br>" . $db->ErrorMsg()); }
       while ($row = $result->FetchRow()) {
-	if (!$row['Epost']) continue;
-	$epost[] = $row['Epost'];
+        if (!$row['Epost']) continue;
+        $epost[] = $row['Epost'];
       }
       if (count($epost) > 0) {
-	//	echo '<pre>'; print_r($epost); echo '</pre>';
-	$filename  = $maildir . '/' . $group->Gruppnamn;
-	$file = fopen($filename,'w');
-	if ($file === false) die('Cannot write '.$filename);
-	foreach ($epost as $line) fwrite($file,$line.PHP_EOL);
-	fclose($file);
+        //	echo '<pre>'; print_r($epost); echo '</pre>';
+        $filename  = $maildir . '/' . $group->Gruppnamn;
+        $file = fopen($filename,'w');
+        if ($file === false) die('Cannot write '.$filename);
+        foreach ($epost as $line) fwrite($file,$line.PHP_EOL);
+        fclose($file);
       }
     }
-    //  exit;
   }
+  
   public static function removeAddress($AdressID = null) {
-    global $gCms; if (!isset($gCms)) exit;
+    //global $gCms; if (!isset($gCms)) exit;
     $db = AddressDB::getDB();
     if (is_null($AdressID))
       die('Strange error in removeAddress. No ID.'.PHP_EOL);
diff --git a/lib/class.Person.php b/lib/class.Person.php
index c73a233ea83ad9e57d57ac853c18ceb613bb6915..125b5240cc5caf828e5fac72fef37e1120ab92db 100644
--- a/lib/class.Person.php
+++ b/lib/class.Person.php
@@ -47,7 +47,7 @@ EOS;
     if (is_array($param)) {
       if (isset($param['ID'])) $this->fromDB($param['ID']);
       foreach (self::$personFields as $field) {
-	if ($field == 'ID') continue;
+        if ($field == 'ID') continue;
         if (isset($param[$field])) $this->$field = $param[$field];
       }
       return;
@@ -176,7 +176,7 @@ EOS;
     while ($row = $result->FetchRow()) {
       $person = new $class();
       foreach ($row as $key => $value) {
-	$person->$key = $value;
+        $person->$key = $value;
       }
       $records[] = $person;
     }