diff --git a/includes/LDAPInterface.inc b/includes/LDAPInterface.inc
index 8473278..0aa7b18 100644
--- a/includes/LDAPInterface.inc
+++ b/includes/LDAPInterface.inc
@@ -146,11 +146,11 @@ class LDAPInterface {
         watchdog('ldap', 'Could not start TLS, only supported by LDAP v3.', array(), WATCHDOG_ERROR);
         return;
       }
-      else if (!function_exists('ldap_start_tls')) {
+      elseif (!function_exists('ldap_start_tls')) {
         watchdog('ldap', 'Could not start TLS. It does not seem to be supported by this PHP setup.', array(), WATCHDOG_ERROR);
         return;
       }
-      else if (!ldap_start_tls($this->connection)) {
+      elseif (!ldap_start_tls($this->connection)) {
         watchdog('ldap', 'Could not start TLS. (Error %errno: %error).', array('%errno' => ldap_errno($this->connection), '%error' => ldap_error($this->connection)), WATCHDOG_ERROR);
         return;
       }
diff --git a/ldapauth.admin.inc b/ldapauth.admin.inc
index ad53e54..c4b75cc 100644
--- a/ldapauth.admin.inc
+++ b/ldapauth.admin.inc
@@ -583,7 +583,7 @@ function valid_enc_types() {
 
   // Blowfish
   if ( defined( 'CRYPT_BLOWFISH' ) || CRYPT_BLOWFISH == 1 )
-     $valid_types[6] = t('Blowfish');
+    $valid_types[6] = t('Blowfish');
 
   // MD5
   $valid_types[1] = t('MD5');
@@ -591,7 +591,7 @@ function valid_enc_types() {
   // SMD5 + SHA +  SSHA
   if (function_exists( 'mhash' ) && function_exists( 'mhash_keygen_s2k' ) ) {
     $valid_types[7] = t('Salted MD5');
-	 $valid_types[8] = t('SHA');
+    $valid_types[8] = t('SHA');
     $valid_types[9] = t('Salted SHA');
   }
 
diff --git a/ldapauth.module b/ldapauth.module
index 08b3639..44151d7 100644
--- a/ldapauth.module
+++ b/ldapauth.module
@@ -248,19 +248,19 @@ function ldapauth_user_login_final_validate($form_id, &$form_states) {
 }
 
 function ldapauth_form_user_pass_alter(&$form, &$form_state) {
- 	$form['#validate'][] = 'ldapauth_user_pass';
+  $form['#validate'][] = 'ldapauth_user_pass';
 }
 
 function ldapauth_user_pass($form, &$form_state) {
 
- 	if (isset($form_state['values']['account']) && !empty($form_state['values']['account'])) {
- 		$account = $form_state['values']['account'];
+  if (isset($form_state['values']['account']) && !empty($form_state['values']['account'])) {
+    $account = $form_state['values']['account'];
 
- 		if (isset($account->ldap_authentified)) {
- 			form_set_error('name', t("This is an LDAP account, to change or retrieve the password, please, contact your LDAP administrator"));
- 			unset($form_state['values']['account']);
- 		}
- 	}
+    if (isset($account->ldap_authentified)) {
+      form_set_error('name', t("This is an LDAP account, to change or retrieve the password, please, contact your LDAP administrator"));
+      unset($form_state['values']['account']);
+    }
+  }
 
 }
 
diff --git a/ldapdata.install b/ldapdata.install
index 2e23859..c58eed9 100644
--- a/ldapdata.install
+++ b/ldapdata.install
@@ -1,5 +1,4 @@
 <?php
-// $Id: ldapdata.install,v 1.9 2009/07/20 19:35:40 miglius Exp $
 
 /**
  * @file
diff --git a/ldapdata.module b/ldapdata.module
index 57f7099..b09e706 100644
--- a/ldapdata.module
+++ b/ldapdata.module
@@ -1,5 +1,4 @@
 <?php
-// $Id: ldapdata.module,v 1.31 2009/10/27 14:29:17 miglius Exp $
 
 /**
  * @file
@@ -224,7 +223,7 @@ function _ldapdata_user_load(&$account, $sync = FALSE, $newentry = NULL) {
     $i=0;
     foreach ($newentry as $users => $info) {
       if ($account->ldap_dn == $info['dn']) {
-         $entry = $info['attribs'];
+        $entry = $info['attribs'];
       }
       $i++;
     }
@@ -245,7 +244,7 @@ function _ldapdata_user_load(&$account, $sync = FALSE, $newentry = NULL) {
       $result = db_query("SELECT name, options from {profile_fields} WHERE name IN ($placeholders) AND type = 'date'", $profile_fields);
       $date_fields = array();
       while ($row = db_fetch_object($result)) {
-       array_push($date_fields,$row->name);
+        array_push($date_fields, $row->name);
       }
     }
 
@@ -255,11 +254,11 @@ function _ldapdata_user_load(&$account, $sync = FALSE, $newentry = NULL) {
 
       // Is it a profile field?
       if (is_numeric($drupal_field)) {
-        if(in_array($profile_fields[$drupal_field],$date_fields)) {
+        if (in_array($profile_fields[$drupal_field], $date_fields)) {
           $value = serialize( array(
-            "month" => (int)substr($value,4,2),
-            "day" => (int)substr($value,6,2),
-            "year" => (int)substr($value,0,4)
+            "month" => (int)substr($value, 4, 2),
+            "day" => (int)substr($value, 6, 2),
+            "year" => (int)substr($value, 0, 4)
           ));
         }
 
@@ -274,8 +273,8 @@ function _ldapdata_user_load(&$account, $sync = FALSE, $newentry = NULL) {
           $account->$drupal_field = $value;
         }
       }
-    // Is it a content profile field?
-      else if (strpos($drupal_field, 'field_') === 0) {
+      // Is it a content profile field?
+      elseif (strpos($drupal_field, 'field_') === 0) {
         if ($content_profile_field = isset($content_profile_fields[$drupal_field]) ? $content_profile_fields[$drupal_field] : NULL) {
           $cp_types = content_profile_get_types('types');
           foreach ($cp_types as $type_obj) {
@@ -287,41 +286,40 @@ function _ldapdata_user_load(&$account, $sync = FALSE, $newentry = NULL) {
               $profile->title = (isset($account->name) ? $account->name : '');
               $profile->uid = $account->uid;
             }
-	    // Determine what kind of field we are dealing with
-	    $field_lookup = content_fields($drupal_field);
-	    $field_type = $field_lookup['type'];
-	    switch ($field_type) {
+            // Determine what kind of field we are dealing with
+            $field_lookup = content_fields($drupal_field);
+            $field_type = $field_lookup['type'];
+            switch ($field_type) {
               case 'content_taxonomy':
-	        // Check to see if there are any terms that match
-	        if ($term = taxonomy_get_term_by_name($value)) {
-		  // If so, check to make sure they match the vocabulary
-		  if ($term[0]->vid == $field_lookup['vid']) {
-		    $profile->{$drupal_field}[0]['value'] = $term[0]->tid;
+              // Check to see if there are any terms that match
+                if ($term = taxonomy_get_term_by_name($value)) {
+                  // If so, check to make sure they match the vocabulary
+                  if ($term[0]->vid == $field_lookup['vid']) {
+                    $profile->{$drupal_field}[0]['value'] = $term[0]->tid;
                   }
-		  else {
-		    $newtid = _ldapdata_add_taxonomy_term($value, $field_lookup['vid']);
+                  else {
+                    $newtid = _ldapdata_add_taxonomy_term($value, $field_lookup['vid']);
                     $profile->{$drupal_field}[0]['value'] = $newtid;
-		  }
-		}
-		else {
+                  }
+                }
+                else {
                   $newtid = _ldapdata_add_taxonomy_term($value, $field_lookup['vid']);
-		  $profile->{$drupal_field}[0]['value'] = $newtid;
-		}
-		break;
+                  $profile->{$drupal_field}[0]['value'] = $newtid;
+                }
+                break;
               default:
-	        $profile->{$drupal_field}[0]['value'] = $value;
-	    }
-	    node_save($profile);
+                $profile->{$drupal_field}[0]['value'] = $value;
+            }
+            node_save($profile);
             if ($profile) {
               continue;
             }
           }
         }
-
       }
 
       // Then it might be a Drupal field.
-      else if (isset($account->$drupal_field) && !in_array($drupal_field, array('pass'))) {
+      elseif (isset($account->$drupal_field) && !in_array($drupal_field, array('pass'))) {
         $drupal_fields = array_merge($drupal_fields, array($drupal_field => $value));
       }
     }
@@ -413,7 +411,7 @@ function _ldapdata_user_submit(&$edit, &$user, $category) {
     // Case 1:
     $writeout = array_merge($writeout, _ldapdata_user_update_ldap_attributes($edit, $user));
   }
-  else if ($category == 'account') {
+  elseif ($category == 'account') {
     // Cases 2 && 3:
     $writeout = array_merge($writeout, _ldapdata_user_update_drupal_account($edit, $user));
   }
@@ -572,15 +570,15 @@ function _ldapdata_user_update_profile(&$edit, &$user) {
   $result = db_query("SELECT name, options from {profile_fields} WHERE name IN ($placeholders) AND type = 'date'", $profile_fields);
   $date_fields = array();
   while ($row = db_fetch_object($result)) {
-    array_push($date_fields,$row->name);
+    array_push($date_fields, $row->name);
   }
 
   // Compare against $edit list.
   $writeout = array();
   foreach ($profile_fields as $key => $field) {
-     if (isset($edit[$field]) && isset($ldap_drupal_reverse_mappings[$key]) && in_array($field,$date_fields)) {
+    if (isset($edit[$field]) && isset($ldap_drupal_reverse_mappings[$key]) && in_array($field, $date_fields)) {
       // LDAP GeneralizedTime/Integer Format -> YYYYMMDD
-      $writeout[$ldap_drupal_reverse_mappings[$key]] = sprintf('%04d%02d%02d',$edit[$field]['year'],$edit[$field]['month'],$edit[$field]['day']);
+      $writeout[$ldap_drupal_reverse_mappings[$key]] = sprintf('%04d%02d%02d', $edit[$field]['year'], $edit[$field]['month'], $edit[$field]['day']);
     }
     elseif (isset($edit[$field]) && isset($ldap_drupal_reverse_mappings[$key])) {
       $writeout[$ldap_drupal_reverse_mappings[$key]] = $edit[$field];
@@ -818,7 +816,7 @@ function random_salt( $length ) {
   $str = "";
 
   mt_srand((double)microtime() * 1000000);
-  while( strlen( $str ) < $length )
+  while ( strlen( $str ) < $length )
     $str .= substr( $possible, ( rand() % strlen( $possible ) ), 1 );
 
   return $str;
@@ -839,11 +837,11 @@ function encode_password($clearTxt) {
       break;
 
     case 2: // Crypt
-      $cipherTxt = '{CRYPT}' . crypt($clearTxt,substr($clearTxt,0,2));
+      $cipherTxt = '{CRYPT}' . crypt($clearTxt, substr($clearTxt, 0, 2));
       break;
 
     case 3: // Salted Crypt
-      $cipherTxt = '{CRYPT}' . crypt($clearTxt,random_salt(2));
+      $cipherTxt = '{CRYPT}' . crypt($clearTxt, random_salt(2));
       break;
 
     case 4: // Extended DES
@@ -861,21 +859,22 @@ function encode_password($clearTxt) {
     case 7: // Salted MD5
       mt_srand( (double) microtime() * 1000000 );
       $salt = mhash_keygen_s2k( MHASH_MD5, $clearTxt, substr( pack( "h*", md5( mt_rand() ) ), 0, 8 ), 4 );
-      $cipherTxt = "{SMD5}".base64_encode( mhash( MHASH_MD5, $clearTxt.$salt ).$salt );
+      $cipherTxt = "{SMD5}" . base64_encode( mhash( MHASH_MD5, $clearTxt . $salt ) . $salt );
       break;
 
     case 8: // SHA
       if ( function_exists('sha1') ) {
         $cipherTxt = '{SHA}' . base64_encode( pack( 'H*' , sha1( $clearTxt) ) );
-      } elseif ( function_exists( 'mhash' ) ) {
+      }
+      elseif ( function_exists( 'mhash' ) ) {
         $cipherTxt = '{SHA}' . base64_encode( mhash( MHASH_SHA1, $clearTxt) );
       }
       break;
-		
+
     case 9: // Salted SHA
       mt_srand( (double) microtime() * 1000000 );
       $salt = mhash_keygen_s2k( MHASH_SHA1, $clearTxt, substr( pack( "h*", md5( mt_rand() ) ), 0, 8 ), 4 );
-      $cipherTxt = "{SSHA}".base64_encode( mhash( MHASH_SHA1, $clearTxt.$salt ).$salt );
+      $cipherTxt = "{SSHA}" . base64_encode( mhash( MHASH_SHA1, $clearTxt . $salt ) . $salt );
       break;
 
     default: // Cleartext
diff --git a/ldapgroups.inc b/ldapgroups.inc
index a8e0945..89d3f61 100644
--- a/ldapgroups.inc
+++ b/ldapgroups.inc
@@ -233,7 +233,7 @@ function _ldapgroups_mapping($user, $group) {
   $ldapgroups_mappings = _ldapgroups_ldap_info($user, 'ldapgroups_mappings');
   if (isset($ldapgroups_mappings[$group]))
     return $ldapgroups_mappings[$group];
-  else if (preg_match('/^[^=]+=([^,]+),.*$/', $group, $matches))
+  elseif (preg_match('/^[^=]+=([^,]+),.*$/', $group, $matches))
     return $matches[1];
   else
     return $group;
diff --git a/ldapgroups.module b/ldapgroups.module
index d97ed71..f7ed397 100644
--- a/ldapgroups.module
+++ b/ldapgroups.module
@@ -1,5 +1,4 @@
 <?php
-// $Id: ldapgroups.module,v 1.40 2009/08/25 13:23:37 miglius Exp $
 
 /**
  * @file
diff --git a/ldaphelp/ldaphelp.module b/ldaphelp/ldaphelp.module
index f71a6cb..779e293 100644
--- a/ldaphelp/ldaphelp.module
+++ b/ldaphelp/ldaphelp.module
@@ -217,13 +217,13 @@ function _ldaphelp_get_configuration($admin_settings = TRUE, $sids = NULL) {
         $sids[] = $row->sid;
       }
     }
-   if (count($sids) > 0) {
-    foreach ($sids as $sid) {
-      $form = ldapauth_admin_form($form_state, 'edit', $sid);
-      $data['ldaps'][$sid] = _ldaphelp_get_form_values($form);
-      unset($data['ldaps'][$sid]['bindpw_clear']);
+    if (count($sids) > 0) {
+      foreach ($sids as $sid) {
+        $form = ldapauth_admin_form($form_state, 'edit', $sid);
+        $data['ldaps'][$sid] = _ldaphelp_get_form_values($form);
+        unset($data['ldaps'][$sid]['bindpw_clear']);
+      }
     }
-   }
   }
   return $data;
 }
diff --git a/ldapsync.admin.inc b/ldapsync.admin.inc
index 6bcda9a..94a7cf8 100644
--- a/ldapsync.admin.inc
+++ b/ldapsync.admin.inc
@@ -1,5 +1,4 @@
 <?php
-// $Id$
 
 /**
  * @file
@@ -54,7 +53,7 @@ function ldapsync_admin_settings() {
     '#title' => t('Missing users action'),
     '#description' => t("What to do when LDAP-authentified Drupal users don't exist or are disabled in LDAP. Choose block to disable the user accounts in Drupal. Choose warn to only log a warning to the Drupal log."),
     '#default_value' => variable_get('ldapsync_missing_users_action', 'warn'),
-    '#options' => array('warn'=>t('warn'), 'block'=>t('block')),
+    '#options' => array('warn' => t('warn'), 'block' => t('block')),
   );
 
   $form['manual'] = array(
diff --git a/ldapsync.install b/ldapsync.install
index 84a67e3..8582a85 100644
--- a/ldapsync.install
+++ b/ldapsync.install
@@ -1,5 +1,4 @@
 <?php
-// $Id$
 
 /**
  * @file
diff --git a/ldapsync.module b/ldapsync.module
index b27adc3..efef278 100644
--- a/ldapsync.module
+++ b/ldapsync.module
@@ -1,5 +1,4 @@
 <?php
-// $Id$
 
 /**
  * @file
