diff --git a/og_invite_link.admin.inc b/og_invite_link.admin.inc
index d771c97..714f4e5 100644
--- a/og_invite_link.admin.inc
+++ b/og_invite_link.admin.inc
@@ -1,5 +1,6 @@
 <?php
 
+
 /**
  * @file
  *  Contains administration pages.
@@ -23,4 +24,5 @@ function og_invite_link_admin() {
     '#options' => $options,
   );
   return system_settings_form($form);
-}
\ No newline at end of file
+}
+
diff --git a/og_invite_link.install b/og_invite_link.install
index 6791c94..000b3f8 100644
--- a/og_invite_link.install
+++ b/og_invite_link.install
@@ -1,5 +1,6 @@
 <?php
 
+
 /**
  * @file
  *   Install file for og_invite_link module
@@ -15,58 +16,58 @@ function og_invite_link_schema() {
       'iid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
-        'not null' => TRUE
+        'not null' => TRUE,
       ),
       'uid' => array(
         'description' => 'The uid of the invited user.',
         'type' => 'int',
         'unsigned' => TRUE,
-        'not null' => TRUE
+        'not null' => TRUE,
       ),
       'group_nid' => array(
         'description' => 'The group node id into which the user has been invited.',
         'type' => 'int',
         'unsigned' => TRUE,
-        'not null' => TRUE
+        'not null' => TRUE,
       ),
       'sender' => array(
         'description' => 'The uid of the invite sender.',
         'type' => 'int',
         'unsigned' => TRUE,
-        'not null' => TRUE
+        'not null' => TRUE,
       ),
       'moderated' => array(
         'description' => 'Boolean indication for if the invitation results in a moderated group acceptance.',
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
-        'default' => 0
+        'default' => 0,
       ),
       'invite_key' => array(
         'description' => 'A key used to generate a token that will be used in the invitation link sent on the mail.',
         'type' => 'varchar',
         'length' => 10,
         'not null' => TRUE,
-        'default' => ''
+        'default' => '',
       ),
       'token' => array(
         'description' => 'The generated token used in the invite links.',
         'type' => 'varchar',
         'length' => 32,
         'not null' => TRUE,
-        'default' => ''
+        'default' => '',
       ),
       'timestamp' => array(
         'description' => 'The UNIX timestamp of when the invitation has been issued.',
         'type' => 'int',
         'unsigned' => TRUE,
-        'not null' => TRUE
+        'not null' => TRUE,
       ),
       'accepted_timestamp' => array(
         'description' => 'The UNIX timestamp of when the invitation has been accepted.',
         'type' => 'int',
         'unsigned' => TRUE,
-        'not null' => TRUE
+        'not null' => TRUE,
       ),
     ),
     'indexes' => array(
@@ -90,3 +91,4 @@ function og_invite_link_install() {
 function og_invite_link_uninstall() {
   drupal_uninstall_schema('og_invite_link');
 }
+
diff --git a/og_invite_link.module b/og_invite_link.module
index 50ebdfe..993b191 100644
--- a/og_invite_link.module
+++ b/og_invite_link.module
@@ -1,5 +1,6 @@
 <?php
 
+
 /**
  * Implementation of hook_menu();
  */
@@ -26,7 +27,8 @@ function og_invite_link_menu() {
   $items['og_invite_link/autocomplete'] = array(
     'title' => 'Autocomplete OG invite link',
     'page callback' => 'og_invite_link_autocomplete',
-    'access arguments' => array('access user profiles'), //is this the right permission?
+    // is this the right permission?
+    'access arguments' => array('access user profiles'),
     'type' => MENU_CALLBACK,
     'file' => 'og_invite_link.pages.inc',
   );
@@ -51,31 +53,31 @@ function og_invite_link_menu_alter(&$items) {
 
 /**
  * Implementation of hook_form_FORM_ID_alter()
- * 
+ *
  * Alter the OG admin settings form
  */
 function og_invite_link_form_og_admin_settings_alter(&$form, &$form_state) {
-	// Add a message template for notifying group admins of sent invitations
-	$form['og_settings']['notifications']['og_invite_admin_subject'] = array(
-	  '#type' => 'textfield',
-	  '#title' => t('Group admin invite notification subject'),
-	  '#description' => t('The subject of the message sent to group admins whenever a user sends out a group invitation. Available variables: @group, @site, @description, !group_url, @body, @sent-to, @sent-by.'),
-	  '#default_value' => _og_invite_link_mail_text('og_invite_admin_subject'),
-	  '#weight' => 19,
-	);
-	$form['og_settings']['notifications']['og_invite_admin_body'] = array(
-	  '#type' => 'textarea',
-	  '#title' => t('Group admin invite notification body'),
-	  '#description' => t('The body of the message sent to group admins whenever a user sends out a group invitation. Available variables: @group, @site, @description, !group_url, @body, @sent-to, @sent-by.'),
-	  '#default_value' => _og_invite_link_mail_text('og_invite_admin_body'), 
-	  '#weight' => 20,
-	);
-	// Weigh the other invite widgets with these
-	$form['og_settings']['notifications']['og_invite_user_subject']['#weight'] = 17;
-	$form['og_settings']['notifications']['og_invite_user_body']['#weight'] = 18;
-	// Add additional variables
-	$form['og_settings']['notifications']['og_invite_user_subject']['#description'] .= t(', @sent-to, @sent-by.');
-	$form['og_settings']['notifications']['og_invite_user_body']['#description'] .= t(', @sent-to, @sent-by.');
+  // Add a message template for notifying group admins of sent invitations
+  $form['og_settings']['notifications']['og_invite_admin_subject'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Group admin invite notification subject'),
+    '#description' => t('The subject of the message sent to group admins whenever a user sends out a group invitation. Available variables: @group, @site, @description, !group_url, @body, @sent-to, @sent-by.'),
+    '#default_value' => _og_invite_link_mail_text('og_invite_admin_subject'),
+    '#weight' => 19,
+  );
+  $form['og_settings']['notifications']['og_invite_admin_body'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Group admin invite notification body'),
+    '#description' => t('The body of the message sent to group admins whenever a user sends out a group invitation. Available variables: @group, @site, @description, !group_url, @body, @sent-to, @sent-by.'),
+    '#default_value' => _og_invite_link_mail_text('og_invite_admin_body'),
+    '#weight' => 20,
+  );
+  // Weigh the other invite widgets with these
+  $form['og_settings']['notifications']['og_invite_user_subject']['#weight'] = 17;
+  $form['og_settings']['notifications']['og_invite_user_body']['#weight'] = 18;
+  // Add additional variables
+  $form['og_settings']['notifications']['og_invite_user_subject']['#description'] .= t(', @sent-to, @sent-by.');
+  $form['og_settings']['notifications']['og_invite_user_body']['#description'] .= t(', @sent-to, @sent-by.');
 }
 
 /**
@@ -103,6 +105,7 @@ function og_invite_link_og_links_alter(&$links) {
  *   the current group
  * @param $user
  *   Optionally supply the user, otherwise use the current user
+ *
  * @return
  *   TRUE if the user can access the groups invite page, otherwise FALSE
  */
@@ -140,6 +143,7 @@ function og_invite_link_invite_access($group = NULL, $user = NULL) {
         return TRUE;
       }
       break;
+
     case OG_CLOSED:
       // Admins were granted access prior to this
       break;
@@ -177,26 +181,26 @@ function og_invite_link_join_access($node, $account, $token) {
  * Implementation of hook_mail();
  */
 function og_invite_link_mail($key, &$message, $params) {
-	static $users = array();
-	static $admins = array();
-	
+  static $users = array();
+  static $admins = array();
+
   switch ($key) {
     case 'invite_to_group':
       $invitation = $params['invitation'];
       $group = $params['group'];
-    
+
       // Load the invitation recipient
       if (!isset($users[$invitation->uid])) {
-				$users[$invitation->uid] = user_load($invitation->uid);
-			}
+        $users[$invitation->uid] = user_load($invitation->uid);
+      }
       $sent_to = $users[$invitation->uid];
-      
+
       // Load the invitation sender
       if (!isset($users[$invitation->sender])) {
-				$users[$invitation->sender] = user_load($invitation->sender);
-			}
+        $users[$invitation->sender] = user_load($invitation->sender);
+      }
       $sent_by = $users[$invitation->sender];
-      
+
       // Populate the message variables
       $variables = array(
         '@group' => check_plain($group->title),
@@ -207,36 +211,35 @@ function og_invite_link_mail($key, &$message, $params) {
         '@sent-by' => $sent_by->name,
         '!group_url' => url("group/{$group->nid}/join/{$invitation->uid}/{$invitation->token}", array('absolute' => TRUE)),
       );
-      
+
       // Set the message subject and body
       $message['subject'] = _og_invite_link_mail_text('og_invite_user_subject', $variables, $message['language']);
       $message['body'] = _og_invite_link_mail_text('og_invite_user_body', $variables, $message['language']);
-      
+
       // Check if og_notifications is available before we notify admins
       if (module_exists('og_notifications')) {
         // Determine the admins of this group
         if (!isset($admins[$group->nid])) {
-					$admins[$group->nid] = array();
-					$sql = "SELECT og.uid, u.language FROM {og_uid} og";
-					$sql .= " INNER JOIN {users} u ON u.uid = og.uid";
-					$sql .= " WHERE og.nid = %d";
-					$sql .= " AND og.is_active = 1";
-					$sql .= " AND og.is_admin = 1";
-					$sql .= " AND u.status = 1";
-					$results = db_query($sql, $group->nid);
-					while ($admin = db_fetch_object($results)) {
-						$admins[$group->nid][$admin->uid] = $admin;
-					}
-				}
-				
-				// Notify each admin
-				foreach ($admins[$group->nid] as $admin) {
-					$subject = _og_invite_link_mail_text('og_invite_admin_subject', $variables, $admin->language);
-					$body = _og_invite_link_mail_text('og_invite_admin_body', $variables, $admin->language);
-				  notifications_lite_send($admin->uid, $subject, $body);
-				}
-			}
-			
+          $admins[$group->nid] = array();
+          $sql                 = "SELECT og.uid, u.language FROM {og_uid} og";
+          $sql                .= " INNER JOIN {users} u ON u.uid = og.uid";
+          $sql                .= " WHERE og.nid = %d";
+          $sql                .= " AND og.is_active = 1";
+          $sql                .= " AND og.is_admin = 1";
+          $sql                .= " AND u.status = 1";
+          $results             = db_query($sql, $group->nid);
+          while ($admin = db_fetch_object($results)) {
+            $admins[$group->nid][$admin->uid] = $admin;
+          }
+        }
+
+        // Notify each admin
+        foreach ($admins[$group->nid] as $admin) {
+          $subject = _og_invite_link_mail_text('og_invite_admin_subject', $variables, $admin->language);
+          $body = _og_invite_link_mail_text('og_invite_admin_body', $variables, $admin->language);
+          notifications_lite_send($admin->uid, $subject, $body);
+        }
+      }
       break;
   }
 }
@@ -272,6 +275,7 @@ function og_invite_link_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  *
  * @param object $invitation
  *   The invitation object
+ *
  * @return
  *   A token string
  */
@@ -311,7 +315,7 @@ function og_invite_link_send_invite($user, $group, $additional_message = NULL) {
     'group' => $group,
     'account' => $account,
     'additional_message' => $additional_message,
-    'invitation' => $invitation
+    'invitation' => $invitation,
   );
   drupal_mail('og_invite_link', 'invite_to_group', $account->mail, user_preferred_language($account), $mail_params);
 
@@ -326,6 +330,7 @@ function og_invite_link_send_invite($user, $group, $additional_message = NULL) {
  *   The ID of the user being invited, or the user object
  * @param $group
  *   The ID of the group the user is being invited to, or the group object
+ *
  * @return
  *   The invitation object, if sucessful, or FALSE, if not
  */
@@ -375,6 +380,7 @@ function og_invite_link_cron() {
  *
  * @param $token
  *   The invitation token
+ *
  * @return
  *   An invitation object
  */
@@ -408,7 +414,8 @@ function og_invite_link_action_info() {
     'description' => t('Invite users to groups'),
     'configurable' => TRUE,
     'hooks' => array(
-      'any' => TRUE, // is this ok?
+      // is this ok?
+      'any' => TRUE,
     ),
   );
   return $info;
@@ -504,7 +511,7 @@ function og_invite_link_invite_users_action_submit($form, &$form_state) {
   return array(
     'groups' => $form_state['values']['groups'],
     'invitees' => $form_state['values']['invitees'],
-    'additional_message' => $form_state['values']['additional_message']
+    'additional_message' => $form_state['values']['additional_message'],
   );
 }
 
@@ -587,34 +594,38 @@ function og_invite_link_invite_users_to_groups($params) {
 
 /**
  * Provide the text for invitation mail components
- * 
+ *
  * @param $key
  *   The message key (site variable name)
  * @param $variables
  *   An array of variables for the message
  * @param $language
  *   The preferred language object
+ *
  * @return
  *   A message string
  */
 function _og_invite_link_mail_text($key, $variables = array(), $language = NULL) {
   $langcode = isset($language) ? (is_object($language) ? $language->language : $language) : NULL;
-  
-	// See if we have a variable set for this
-	if ($message = variable_get($key, FALSE)) {
-		return strtr($message, $variables);
-	}
-	// Provide defaults
-	else {
-		switch ($key) {
-			case 'og_invite_user_subject':
-			case 'og_invite_user_body':
-			  // Use OG's handler
-			  return _og_mail_text($key, $variables, $language);
-			case 'og_invite_admin_subject':
-			  return t("Invitation sent out for the group '@group'", $variables, $langcode);
-			case 'og_invite_admin_body':
-			  return t("A group member has sent out an invitation for the group, '@group'.\n\nSent to: @sent-to\nSent by: @sent-by\n\nAdditional message:\n@body", $variables, $langcode);
-		}
-	}
+
+  // See if we have a variable set for this
+  if ($message = variable_get($key, FALSE)) {
+    return strtr($message, $variables);
+  }
+  // Provide defaults
+  else {
+    switch ($key) {
+      case 'og_invite_user_subject':
+      case 'og_invite_user_body':
+        // Use OG's handler
+        return _og_mail_text($key, $variables, $language);
+
+      case 'og_invite_admin_subject':
+        return t("Invitation sent out for the group '@group'", $variables, $langcode);
+
+      case 'og_invite_admin_body':
+        return t("A group member has sent out an invitation for the group, '@group'.\n\nSent to: @sent-to\nSent by: @sent-by\n\nAdditional message:\n@body", $variables, $langcode);
+    }
+  }
 }
+
diff --git a/og_invite_link.pages.inc b/og_invite_link.pages.inc
index 42e3c35..f5c5d5f 100644
--- a/og_invite_link.pages.inc
+++ b/og_invite_link.pages.inc
@@ -1,5 +1,6 @@
 <?php
 
+
 /**
  * @file
  *   Contains the page callback functions for this module
@@ -33,7 +34,7 @@ function og_invite_link_invite_page_form($form_state = array(), $nodes) {
   $form['additional_message'] = array(
     '#type' => 'textarea',
     '#title' => t('Additional message'),
-    '#description' => t('Insert an additional message to be sent to the users.')
+    '#description' => t('Insert an additional message to be sent to the users.'),
   );
   $form['submit'] = array(
     '#type' => 'submit',
@@ -72,9 +73,10 @@ function og_invite_link_invite_page_form_validate($form, &$form_state) {
  */
 function og_invite_link_invite_page_form_submit($form, &$form_state) {
   $invitiation_result = og_invite_link_invite_users_to_groups(array(
-                                          'groups' => $form_state['values']['groups'],
-                                          'invitees' => $form_state['values']['invitees'],
-                                          'additional_message' => $form_state['values']['additional_message']));
+      'groups' => $form_state['values']['groups'],
+      'invitees' => $form_state['values']['invitees'],
+      'additional_message' => $form_state['values']['additional_message'],
+    ));
   // Here we should not have more than one group.
   $group = current($form_state['values']['groups']);
   // Set a message for the invited users
@@ -167,12 +169,14 @@ function og_invite_link_join($group, $account, $token) {
     if ($moderated = $invitation->moderated) {
       switch ($group->og_selective) {
         // If the group is open, no moderation needed
+
         case OG_OPEN:
           $moderated = 0;
           break;
 
         // If moderated and the group is now closed, this is no
         // longer a valid invitation
+
         case OG_CLOSED:
           // Alert the user
           drupal_set_message(t('This invitation is no longer valid.'), 'error');
@@ -227,14 +231,14 @@ function og_invite_link_autocomplete($string = '') {
   if ($last_string != '') {
     $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER('%s%%')", $last_string, 0, 10);
 
-    $prefix = count($array) ? implode(', ', $array) .', ' : '';
+    $prefix = count($array) ? implode(', ', $array) . ', ' : '';
 
     while ($name = db_fetch_object($result)) {
       $n = $name->name;
       // Commas and quotes in usernames are special cases, so encode 'em.
       //(Although the usernames should not have such characters).
       if (strpos($name->name, ',') !== FALSE || strpos($name->name, '"') !== FALSE) {
-        $n = '"'. str_replace('"', '""', $name->name) .'"';
+        $n = '"' . str_replace('"', '""', $name->name) . '"';
       }
       $matches[$prefix . $n] = check_plain($name->name);
     }
@@ -242,3 +246,4 @@ function og_invite_link_autocomplete($string = '') {
 
   drupal_json($matches);
 }
+
