diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index c2ba07d..deb2759 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,9 @@
+Sat 10 Dec 2011
+
+changed filenames to single extenstion only
+removed $Id because this is no longer valid for git
+removed trailing empty lines at fileend
+
 
 Wed 06 Oct 2010 14:45:06 CEST 
 
diff --git a/groupadmin.access.inc b/groupadmin.access.inc
new file mode 100644
index 0000000..ca37ec3
--- /dev/null
+++ b/groupadmin.access.inc
@@ -0,0 +1,180 @@
+<?php
+
+/********************************************************
+Original development by: netgenius.co.uk
+Commercial support is available from www.netgenius.co.uk
+Contact: drupal(a)netgenius.co.uk
+*********************************************************/
+
+/**
+ * Implementation of hook_perm().
+ */
+function groupadmin_perm() {
+  // Define our permissions, and short-name for them.
+  // Long permission names can be changed here if needed - they are defined here and referenced elsewhere.
+  if (_groupadmin_settings('x_more_permissions')) {
+    return array(
+      'ga-admin'  => 'administer groupadmin',
+      'manager'   => 'act as the manager for any group',
+      'admins'    => 'act as an admin for any group',
+      'members'   => 'act as a member for any group',
+      'visitors'  => 'act as a visitor for any group',
+      'email'     => 'view/search email addresses',
+      'name'      => 'view/search real names',
+    );
+  }
+  else {
+    return array('ga-admin'  => 'administer groupadmin');
+  }
+}
+
+/**
+ * Check user has a permission defined by this module.
+ * Result statically cached.
+ */
+function _groupadmin_user_access($perm) {
+  static $cached;
+  $access =& $cached[$perm];
+
+  if (!isset($access))  {
+    $perms = groupadmin_perm();
+    $basic = array_key_exists($perm, $perms) && user_access($perms[$perm]);
+    $super = user_access('administer permissions') || user_access('administer groupadmin');
+    $access = $basic || $super;
+  }
+  return $access;
+}
+
+/**
+ * Return an array of all groupadmin roles.
+ */
+function _groupadmin_all_roles() {
+  // All posssible roles in order of decreasing access.
+  return array('manager', 'admins', 'members', 'visitors');
+}
+
+/**
+ * Test if the current user has the specified *or higher* groupadmin role.
+ * Result statically cached.
+ */
+function _groupadmin_user_has_effective_role($gid, $role) {
+
+  static $cached;
+  $has_role =& $cached[$gid][$role];
+
+  if (!isset($has_role))  {
+    // Assume user does not have role.
+    $has_role = FALSE;
+
+    // Check our global permissions...
+    // Get array of all roles (in order of decreasing access.)
+    $roles = _groupadmin_all_roles();
+    // Get numeric key of the specified role - we will check from here down to zero ('manager').
+    // In the event of invalid role-name in $role, this would just test 'manager', so that's ok.
+    $n = array_search($role, $roles);
+    // Loop, checking specified role and higher-access roles.
+    while($n >= 0 && !$has_role) {
+      $has_role = _groupadmin_user_access($roles[$n]);
+      //drupal_set_message(sprintf('%s Check for %s as %s - %d', $gid, $role, $roles[$n], $has_role), 'error');
+      $n--;
+    }
+
+    // If no suitable role yet, check specific access to this group...
+    if (!$has_role) {
+      $has_role = _groupadmin_user_has_specific_role($gid, $role);
+      //drupal_set_message(sprintf('%s Specific check for %s - %d', $gid, $role, $has_role), 'warning');
+    }
+  }
+  return $has_role;
+}
+
+/**
+ * Test if the current user has the specified role for the given group.
+ */
+function _groupadmin_user_has_specific_role($gid, $role) {
+
+  global $user;
+  $group_node = _groupadmin_get_group($gid);
+
+  switch($role) {
+    case 'manager':
+      $has_role = ($user->uid == $group_node->uid);
+      break;
+
+    case 'admins':
+      $has_role = og_is_group_admin($group_node, $user);
+      break;
+
+    case 'members':
+      $has_role = _groupadmin_is_group_member($group_node->nid, $user->uid);
+      break;
+
+    case 'visitors':
+      $has_role = node_access('view', $group_node, $user);
+      break;
+
+    default:
+      $has_role = FALSE;
+  }
+  
+  return $has_role;
+}
+
+/**
+ * Check whether current user can access groupadmin for given group and action.
+ * $group can be group-node object or gid.
+ * Result statically cached.
+ * Return TRUE if access is allowed, otherwise FALSE;
+ */
+function _groupadmin_access($group, $op = 'basic_access') {
+  
+  $gid = is_object($group)?  $group->nid : $group;
+  if (!$gid) {
+    drupal_set_message('_groupadmin_access - invalid group parameter', 'error');
+    return FALSE;
+  }
+  
+  static $cached;
+  $access =& $cached[$gid][$op];
+  if (!isset($access))  {
+    $access = _groupadmin_access_check($gid, $op);
+    // Make sure user has basic access too.
+    if ($op != 'basic_access')  $access &= _groupadmin_access($gid);
+    //drupal_set_message(sprintf('gid:%s check: %s -> %s', $gid, $op, $access), 'error');
+  }
+  return $access;
+}
+
+/**
+ * Check whether current user can perform admin tasks for given group.
+ * $group can be group node-object or gid.
+ */
+function _groupadmin_access_admin($group) {
+  return _groupadmin_access($group, 'administrate');
+}
+
+/**
+ * Check whether the current user can perform specified tasks for given group.
+ * We don't need to worry too much about performance here, as result
+ * will normally be cached via _groupadmin_access() function.
+ */
+function _groupadmin_access_check($gid, $op) {
+
+  // Initial checks: make sure $gid is a valid Group node.
+  if (!_groupadmin_checkfunc('og_is_group_type'))  return FALSE;
+  if (!og_is_group_type(_groupadmin_get_group($gid, 'type')))  return FALSE;
+
+  switch ($op) {
+    case 'administrate':
+      $required_role = 'admins';
+      break;
+    case 'show_all':
+      $required_role = _groupadmin_settings('l_show_non-members');
+      break;
+    default:
+      $required_role = _groupadmin_settings('l_' . $op);
+  }
+
+  $access = _groupadmin_user_has_effective_role($gid, $required_role);
+  return $access;
+}
diff --git a/groupadmin.access.inc.php b/groupadmin.access.inc.php
deleted file mode 100644
index ca37ec3..0000000
--- a/groupadmin.access.inc.php
+++ /dev/null
@@ -1,180 +0,0 @@
-<?php
-
-/********************************************************
-Original development by: netgenius.co.uk
-Commercial support is available from www.netgenius.co.uk
-Contact: drupal(a)netgenius.co.uk
-*********************************************************/
-
-/**
- * Implementation of hook_perm().
- */
-function groupadmin_perm() {
-  // Define our permissions, and short-name for them.
-  // Long permission names can be changed here if needed - they are defined here and referenced elsewhere.
-  if (_groupadmin_settings('x_more_permissions')) {
-    return array(
-      'ga-admin'  => 'administer groupadmin',
-      'manager'   => 'act as the manager for any group',
-      'admins'    => 'act as an admin for any group',
-      'members'   => 'act as a member for any group',
-      'visitors'  => 'act as a visitor for any group',
-      'email'     => 'view/search email addresses',
-      'name'      => 'view/search real names',
-    );
-  }
-  else {
-    return array('ga-admin'  => 'administer groupadmin');
-  }
-}
-
-/**
- * Check user has a permission defined by this module.
- * Result statically cached.
- */
-function _groupadmin_user_access($perm) {
-  static $cached;
-  $access =& $cached[$perm];
-
-  if (!isset($access))  {
-    $perms = groupadmin_perm();
-    $basic = array_key_exists($perm, $perms) && user_access($perms[$perm]);
-    $super = user_access('administer permissions') || user_access('administer groupadmin');
-    $access = $basic || $super;
-  }
-  return $access;
-}
-
-/**
- * Return an array of all groupadmin roles.
- */
-function _groupadmin_all_roles() {
-  // All posssible roles in order of decreasing access.
-  return array('manager', 'admins', 'members', 'visitors');
-}
-
-/**
- * Test if the current user has the specified *or higher* groupadmin role.
- * Result statically cached.
- */
-function _groupadmin_user_has_effective_role($gid, $role) {
-
-  static $cached;
-  $has_role =& $cached[$gid][$role];
-
-  if (!isset($has_role))  {
-    // Assume user does not have role.
-    $has_role = FALSE;
-
-    // Check our global permissions...
-    // Get array of all roles (in order of decreasing access.)
-    $roles = _groupadmin_all_roles();
-    // Get numeric key of the specified role - we will check from here down to zero ('manager').
-    // In the event of invalid role-name in $role, this would just test 'manager', so that's ok.
-    $n = array_search($role, $roles);
-    // Loop, checking specified role and higher-access roles.
-    while($n >= 0 && !$has_role) {
-      $has_role = _groupadmin_user_access($roles[$n]);
-      //drupal_set_message(sprintf('%s Check for %s as %s - %d', $gid, $role, $roles[$n], $has_role), 'error');
-      $n--;
-    }
-
-    // If no suitable role yet, check specific access to this group...
-    if (!$has_role) {
-      $has_role = _groupadmin_user_has_specific_role($gid, $role);
-      //drupal_set_message(sprintf('%s Specific check for %s - %d', $gid, $role, $has_role), 'warning');
-    }
-  }
-  return $has_role;
-}
-
-/**
- * Test if the current user has the specified role for the given group.
- */
-function _groupadmin_user_has_specific_role($gid, $role) {
-
-  global $user;
-  $group_node = _groupadmin_get_group($gid);
-
-  switch($role) {
-    case 'manager':
-      $has_role = ($user->uid == $group_node->uid);
-      break;
-
-    case 'admins':
-      $has_role = og_is_group_admin($group_node, $user);
-      break;
-
-    case 'members':
-      $has_role = _groupadmin_is_group_member($group_node->nid, $user->uid);
-      break;
-
-    case 'visitors':
-      $has_role = node_access('view', $group_node, $user);
-      break;
-
-    default:
-      $has_role = FALSE;
-  }
-  
-  return $has_role;
-}
-
-/**
- * Check whether current user can access groupadmin for given group and action.
- * $group can be group-node object or gid.
- * Result statically cached.
- * Return TRUE if access is allowed, otherwise FALSE;
- */
-function _groupadmin_access($group, $op = 'basic_access') {
-  
-  $gid = is_object($group)?  $group->nid : $group;
-  if (!$gid) {
-    drupal_set_message('_groupadmin_access - invalid group parameter', 'error');
-    return FALSE;
-  }
-  
-  static $cached;
-  $access =& $cached[$gid][$op];
-  if (!isset($access))  {
-    $access = _groupadmin_access_check($gid, $op);
-    // Make sure user has basic access too.
-    if ($op != 'basic_access')  $access &= _groupadmin_access($gid);
-    //drupal_set_message(sprintf('gid:%s check: %s -> %s', $gid, $op, $access), 'error');
-  }
-  return $access;
-}
-
-/**
- * Check whether current user can perform admin tasks for given group.
- * $group can be group node-object or gid.
- */
-function _groupadmin_access_admin($group) {
-  return _groupadmin_access($group, 'administrate');
-}
-
-/**
- * Check whether the current user can perform specified tasks for given group.
- * We don't need to worry too much about performance here, as result
- * will normally be cached via _groupadmin_access() function.
- */
-function _groupadmin_access_check($gid, $op) {
-
-  // Initial checks: make sure $gid is a valid Group node.
-  if (!_groupadmin_checkfunc('og_is_group_type'))  return FALSE;
-  if (!og_is_group_type(_groupadmin_get_group($gid, 'type')))  return FALSE;
-
-  switch ($op) {
-    case 'administrate':
-      $required_role = 'admins';
-      break;
-    case 'show_all':
-      $required_role = _groupadmin_settings('l_show_non-members');
-      break;
-    default:
-      $required_role = _groupadmin_settings('l_' . $op);
-  }
-
-  $access = _groupadmin_user_has_effective_role($gid, $required_role);
-  return $access;
-}
diff --git a/groupadmin.config.inc b/groupadmin.config.inc
new file mode 100644
index 0000000..4bbc9f9
--- /dev/null
+++ b/groupadmin.config.inc
@@ -0,0 +1,307 @@
+<?php
+
+/********************************************************
+Original development by: netgenius.co.uk
+Commercial support is available from www.netgenius.co.uk
+Contact: drupal(a)netgenius.co.uk
+*********************************************************/
+
+/**
+ * Get a config. value.
+ */
+function _groupadmin_settings($key, $return_key = FALSE) {
+  static $config;
+  static $fields;
+
+  $config_name = 'groupadmin';
+  if(!$config) {
+    $config = variable_get($config_name, array());
+  }
+
+  $fields = _groupadmin_settings_fields();
+  $field = $fields[$key];
+  $value = isset($config[$key])? $config[$key] : $field[1];
+  $options = $field[2];
+
+  return (is_array($options) && !$return_key)? $options[$value] : $value;
+}
+
+/**
+ * Get fields array for config values.
+ */
+function _groupadmin_settings_fields($context = FALSE) {
+  static $fields;
+  if ($fields)  return $fields;
+
+  // Get possible access types.
+  $roles = array_merge(array('nobody'), _groupadmin_all_roles());
+
+  // Array of variables of name => array: description, [default value], [required/options], [menu_rebuild_needed].
+  // For fieldset: name => array: description, [collapsed], [collapsible].
+  $links = array(
+    // Display of standard links/tabs.
+    'f_links' => array('Here you can add GroupAdmin to the "home page" for each Group, and hide the standard OG "Add Members" option.', TRUE, TRUE),
+    't_link_title' => array('Choose a title for the link.', 'Members', TRUE, TRUE),
+    'x_show_on_node_page' => array('Should GroupAdmin add its <em>Members</em> tab to the Group "home page"? e.g: at node/123/groupadmin', TRUE, FALSE, TRUE),
+    //'x_show_on_members_page' => array('Show GroupAdmin <em>Members</em> link on standard <em>members</em> page, e.g: at og/users/123/groupadmin', TRUE, FALSE, TRUE),
+    //'x_use_standard_path' => array('Show GroupAdmin at standard OG member-list location, e.g: og/users/123. You may also need to disable or modify menu paths for ' .
+    //   '<em>og_members</em>, <em>og_members_faces</em> and any similar ' . l('Views', 'admin/build/views') . '.', FALSE, FALSE, TRUE),
+    'x_remove_standard_link' => array('Remove the standard OG <em>Add Members</em> link.', TRUE, FALSE, TRUE),
+
+    // Advanced options.
+    'f_more_links_(advanced)' => array('Here you can try to show GroupAdmin alongside standard OG tabs, '
+                                      .'but you will probably need to manually edit some of the Views used by OG to make it work. '
+                                      .'Exact behaviour also depends on whether you have <em>Organic groups Views integration</em> installed or not.',
+                                      TRUE, TRUE),
+       
+    'x_show_on_members_page' => array('Show GroupAdmin <em>Members</em> link on standard <em>members</em> page, e.g: at og/users/123/groupadmin', TRUE, FALSE, TRUE),
+    'x_use_standard_path' => array('Show GroupAdmin at standard OG member-list location, e.g: og/users/123/list. You may also need to disable or modify menu paths for ' .
+       '<em>og_members</em> in ' . l('Views', 'admin/build/views') . '.', FALSE, FALSE, TRUE),
+  );
+
+  $options = array(
+    // GroupAdmin display appearance/behaviour.
+    'f_options' => array('Options for appearance and behaviour.', TRUE, TRUE),
+    'n_help_node' => array('Node (nid) for help section. If not specified, help section will not be displayed.'),
+    'n_member_help_node' => array('Node (nid) for help for members.  If not specified, main help node will be used.'),
+    'n_admin_help_node' => array('Node (nid) for help for admins. If not specified, member help node will be used.'),
+    'x_help_collapsed' => array('If set, help section initially appears collapsed.', TRUE),
+    'n_pagelen' => array('Page length for user list.', 10, TRUE),
+    'x_reset_on_add' => array('Clear the search criteria after adding a new member.', FALSE),
+    'x_require_confirmation' => array('Require confirmation for administrative operations (add, remove, etc.)', TRUE),
+  );
+
+  $access = array(
+    // Access control.
+    'f_access_control' => array('This section allows you to define access controls.  '
+                              . 'Note: <em>manager</em> and <em>admin</em> here refer to Group roles and '
+                              . '<em>visitor</em> means anyone who has access to view the Group node.', TRUE, TRUE),
+    'l_basic_access' => array('Who is allowed basic access to <em>GroupAdmin</em>?', 4, $roles, TRUE),
+    'l_show_admins' => array('Who is allowed to view/search group administrators?', 4, $roles, TRUE),
+    'l_show_members' => array('Who is allowed to view/search group members?', 3, $roles, TRUE),
+    'l_show_non-members' => array('Who is allowed to view/search non-members?', 2, $roles),
+    'l_show_email' => array('Who is allowed to view/search email addresses?', 0, $roles),
+    'l_show_real_names' => array('Who is allowed to view/search real names?', 0, $roles),
+    'x_more_permissions' => array('Activate role-based permissions in conjunction with the above.', FALSE, FALSE, TRUE),
+  );
+
+  /*
+  $advanced = array(
+    // Advanced.
+    'f_advanced' => array('<strong>NOT YET FULLY FUNCTIONAL!</strong> This section allows you to define a more flexible configuration for GroupAdmin, depending on group-type and/or individual group.'
+                        . '<ul><li>Using configuration per group-type, the main configuration values will be used as defaults.</li>'
+                        . '<li>Using configuration per group, the group-type and then main configuration values will be used as defaults.</li></ul>', TRUE, TRUE),
+    'x_configuration_per_group_type' => array('Provide a separate configuration for each type of group, accessible via content-type edit pages. '
+                        . 'Access requires <em>administer content types</em> permission.', FALSE, FALSE, TRUE),
+    'x_configuration_per_group' => array('Provide a separate configuration for each individual group.', FALSE, FALSE, TRUE),
+  );
+
+  if ($context) {
+    unset($access['l_basic_access']);
+    unset($access['x_more_permissions']);
+    $fields = array_merge($options, $access);
+  }
+  else {
+    $fields = array_merge($links, $options, $access, $advanced);
+  }
+  */
+  $fields = array_merge($links, $options, $access);
+  // Add configuration arrays from other modules.
+  $fields = array_merge($fields, _groupadmin_get_modules('config_fields'));
+
+  return $fields;
+}
+
+/**
+ * Build the config form from $fields array.
+ */
+function _groupadmin_settings_form_build($fields) {
+  // Build the form...
+
+  // Define skeletons for form elements.
+  // Note: we use single character key, but longer keys should work too.
+  $elements = array(
+    'n' => array('#type'=>'textfield', '#size'=>4, '#element_validate' => array('groupadmin_validate_posint')),
+    't' => array('#type'=>'textfield', '#size'=>30, '#maxlen'=>30),
+    'r' => array('#type'=>'radios'),
+    'l' => array('#type'=>'select'),
+    'x' => array('#type'=>'checkbox'),
+    's' => array('#type'=>'submit'),
+    'f' => array('#type'=>'fieldset'),
+  );
+
+  // Maps - these define how elements in the $fields array relate to FAPI attributes.
+  $maps = array(
+    'default' => array('#description', '#default_value', '#required'),
+    'select'  => array('#description', '#default_value', '#options'),
+    'radio'   => array('#description', '#default_value', '#options'),
+    'fieldset'=> array('#description', '#collapsed', '#collapsible'),
+    'submit'=> array('#default_value'), // Not complete!
+  );
+
+  // Loop through all fields, construct form elements and add them to the form...
+  foreach($fields as $key => $field) {
+
+    // Split fieldname into components: $element['#type'] and $element['#title'].
+    $element = array_combine(array('#type', '#title'), explode('_', $key, 2));
+    // Captialise title and replace underscores with spaces.
+    $element['#title'] = ucfirst(str_replace('_', ' ', $element['#title']));
+    // Copy default structure for this type (updates #type to FAPI #type).
+    $element = array_merge($element, $elements[$element['#type']]);
+    $type = $element['#type'];
+
+    // Copy values from $field to $element using the relevant $map.
+    $map = $maps[$type]? $maps[$type] : $maps['default'];
+    foreach($map as $n => $attribute)  $element[$attribute] = &$field[$n];
+
+    // If processing a fieldset, position it at top level.
+    if ($type == 'fieldset') {
+      $form[$section_name = $key] = $element;
+    }
+    // Otherwise create element inside current fieldset.
+    else {
+      $form[$section_name][$key] = $element;
+    }
+  }
+  //drupal_set_message(print_r($form, 1));
+  return $form;
+}
+
+/**
+ * Build and return the complete config form.
+ */
+function _groupadmin_settings_form($form_state, $context = '', $id = '') {
+  //drupal_set_message(sprintf('Settings form: [%s][%s][%s]', $form_state, $context, $id));
+  //drupal_set_message(sprintf('Form state: %s', print_r($form_state, 1)));
+
+  // Get fields (with default values) for form.
+  $fields = _groupadmin_settings_fields($context .= $id);
+
+  // Replace default values with current values from config.
+  $config = variable_get('groupadmin', array());
+
+  if ($context) {
+    foreach($config as $key => $value) {
+      if (isset($fields[$key])) {
+        $context_value =& $config[$context][$id][$key];
+        $fields[$key][1] = isset($context_value)? $context_value : $config[$key];
+      }
+    }
+  }
+  else {
+    foreach($config as $key => $value) {
+      if (isset($fields[$key])) {
+        $fields[$key][1] = $config[$key];
+      }
+    }
+  }
+
+  // Build the basic form.
+  $form = _groupadmin_settings_form_build($fields);
+
+  // Add validatation function(s) from other modules.
+  $form['#validate'] = _groupadmin_get_modules('config_validate');
+  $form['#validate'][] = '_groupadmin_settings_form_validate';
+  // Add buttons (etc.) using system_settings_form().
+  $form = system_settings_form($form);
+
+  // We want to use *our* submit function, so remove the one put there by system_settings_form().
+  unset($form['#submit']);
+
+  return $form;
+}
+
+/**
+ * Validatation.
+ */
+function _groupadmin_settings_form_validate($form, &$form_state) {
+  $values = $form_state['values'];
+
+  // Security check - Ensure that text entries do not contain invalid characters.
+  foreach($values as $key=>$value) {
+    // If it's a text-entry field and value does not match escaped value, report an error.
+    if (substr($key, 0, 2) == 't_' && $value != check_plain($value)) {
+      $tvars = array('%key' => $key, '%value' => $value);
+      $reason = t('Entry for %key: %value contains invalid characters.', $tvars);
+      form_set_error($key, $reason);
+    }
+  }
+
+  // Check that nodes actually exist.
+  foreach($values as $key => $value) {
+    if (substr($key, -5) == '_node' && $value && !node_load($value)) {
+      form_set_error($key, t('Node @nid does not exist.', array('@nid' => $value)));
+    }
+  }
+}
+
+/**
+ * Submit function for settings form.
+ * Pack values into an array, process update and rebuild menu if needed.
+ */
+function _groupadmin_settings_form_submit($form, &$form_state) {
+  //drupal_set_message(print_r($form_state, 1), 'error');
+  //drupal_set_message(print_r($form, 1), 'warning');
+  //drupal_set_message(print_r($form['f_access_control'], 1), 'warning');
+
+  // Reference form_state['values'] for use later.
+  $values =& $form_state['values'];
+
+  // Get current config (used to test if menu rebuild is needed.)
+  $old_config = variable_get('groupadmin', array());
+
+  // We could skip these steps if "Reset to defaults" was selected, but we do them anyway.
+  if (TRUE) {
+    // Get config $fields.
+    $fields = _groupadmin_settings_fields();
+
+    // Copy relevant $values into $new_state.
+    $new_state['values']['op'] = $values['op'];
+    $new_state['values']['groupadmin'] = array_intersect_key($values, $fields);
+  }
+
+  // Process via systems_settings_form_submit() so that Drupal standard messages are displayed.
+  // @todo: Consider if really worth using system_settings_form.
+  system_settings_form_submit($form, $new_state);
+
+  // Reload new config from newly saved version ("Reset to defaults" may have been used.)
+  $new_config = variable_get('groupadmin', array());
+
+  // Check if menu needs to be rebuilt...
+  $changes = array_diff_assoc($new_config, $old_config);
+  foreach ($changes as $key => $value) {
+    if ($fields[$key][3]) {
+      menu_rebuild();
+      drupal_set_message('The menu has been rebuilt.');
+      break;
+    }
+  }
+}
+
+/**
+ * Test if form field is an integer >= 0.
+ * A value such as '1.0' is deliberately disallowed, even though mathematically valid.
+ * If #required, also check that value is non-zero.
+ */
+function groupadmin_validate_posint($element, &$form_state, $form) {
+  //drupal_set_message(print_r($elements, 1));
+  $value = $element['#value'];
+
+  if ($value !== '') {
+    $name = array('%name' => $element['#title']);
+    if (!is_numeric($value)) {
+      $msg = t('%name value should be numeric.', $name);
+    }
+    elseif ($value == 0 && $element['#required']) {
+      $msg = t('%name value should be greater than zero.', $name);
+    }
+    elseif (strval($value) !== strval(intval($value))) {
+      $msg = t('%name value should be a whole number.', $name);
+    }
+    elseif ($value < 0) {
+      $msg = t('%name value should not be negative.', $name);
+    }
+
+    if ($msg)  form_error($element, $msg);
+  }
+}
diff --git a/groupadmin.config.inc.php b/groupadmin.config.inc.php
deleted file mode 100644
index 4bbc9f9..0000000
--- a/groupadmin.config.inc.php
+++ /dev/null
@@ -1,307 +0,0 @@
-<?php
-
-/********************************************************
-Original development by: netgenius.co.uk
-Commercial support is available from www.netgenius.co.uk
-Contact: drupal(a)netgenius.co.uk
-*********************************************************/
-
-/**
- * Get a config. value.
- */
-function _groupadmin_settings($key, $return_key = FALSE) {
-  static $config;
-  static $fields;
-
-  $config_name = 'groupadmin';
-  if(!$config) {
-    $config = variable_get($config_name, array());
-  }
-
-  $fields = _groupadmin_settings_fields();
-  $field = $fields[$key];
-  $value = isset($config[$key])? $config[$key] : $field[1];
-  $options = $field[2];
-
-  return (is_array($options) && !$return_key)? $options[$value] : $value;
-}
-
-/**
- * Get fields array for config values.
- */
-function _groupadmin_settings_fields($context = FALSE) {
-  static $fields;
-  if ($fields)  return $fields;
-
-  // Get possible access types.
-  $roles = array_merge(array('nobody'), _groupadmin_all_roles());
-
-  // Array of variables of name => array: description, [default value], [required/options], [menu_rebuild_needed].
-  // For fieldset: name => array: description, [collapsed], [collapsible].
-  $links = array(
-    // Display of standard links/tabs.
-    'f_links' => array('Here you can add GroupAdmin to the "home page" for each Group, and hide the standard OG "Add Members" option.', TRUE, TRUE),
-    't_link_title' => array('Choose a title for the link.', 'Members', TRUE, TRUE),
-    'x_show_on_node_page' => array('Should GroupAdmin add its <em>Members</em> tab to the Group "home page"? e.g: at node/123/groupadmin', TRUE, FALSE, TRUE),
-    //'x_show_on_members_page' => array('Show GroupAdmin <em>Members</em> link on standard <em>members</em> page, e.g: at og/users/123/groupadmin', TRUE, FALSE, TRUE),
-    //'x_use_standard_path' => array('Show GroupAdmin at standard OG member-list location, e.g: og/users/123. You may also need to disable or modify menu paths for ' .
-    //   '<em>og_members</em>, <em>og_members_faces</em> and any similar ' . l('Views', 'admin/build/views') . '.', FALSE, FALSE, TRUE),
-    'x_remove_standard_link' => array('Remove the standard OG <em>Add Members</em> link.', TRUE, FALSE, TRUE),
-
-    // Advanced options.
-    'f_more_links_(advanced)' => array('Here you can try to show GroupAdmin alongside standard OG tabs, '
-                                      .'but you will probably need to manually edit some of the Views used by OG to make it work. '
-                                      .'Exact behaviour also depends on whether you have <em>Organic groups Views integration</em> installed or not.',
-                                      TRUE, TRUE),
-       
-    'x_show_on_members_page' => array('Show GroupAdmin <em>Members</em> link on standard <em>members</em> page, e.g: at og/users/123/groupadmin', TRUE, FALSE, TRUE),
-    'x_use_standard_path' => array('Show GroupAdmin at standard OG member-list location, e.g: og/users/123/list. You may also need to disable or modify menu paths for ' .
-       '<em>og_members</em> in ' . l('Views', 'admin/build/views') . '.', FALSE, FALSE, TRUE),
-  );
-
-  $options = array(
-    // GroupAdmin display appearance/behaviour.
-    'f_options' => array('Options for appearance and behaviour.', TRUE, TRUE),
-    'n_help_node' => array('Node (nid) for help section. If not specified, help section will not be displayed.'),
-    'n_member_help_node' => array('Node (nid) for help for members.  If not specified, main help node will be used.'),
-    'n_admin_help_node' => array('Node (nid) for help for admins. If not specified, member help node will be used.'),
-    'x_help_collapsed' => array('If set, help section initially appears collapsed.', TRUE),
-    'n_pagelen' => array('Page length for user list.', 10, TRUE),
-    'x_reset_on_add' => array('Clear the search criteria after adding a new member.', FALSE),
-    'x_require_confirmation' => array('Require confirmation for administrative operations (add, remove, etc.)', TRUE),
-  );
-
-  $access = array(
-    // Access control.
-    'f_access_control' => array('This section allows you to define access controls.  '
-                              . 'Note: <em>manager</em> and <em>admin</em> here refer to Group roles and '
-                              . '<em>visitor</em> means anyone who has access to view the Group node.', TRUE, TRUE),
-    'l_basic_access' => array('Who is allowed basic access to <em>GroupAdmin</em>?', 4, $roles, TRUE),
-    'l_show_admins' => array('Who is allowed to view/search group administrators?', 4, $roles, TRUE),
-    'l_show_members' => array('Who is allowed to view/search group members?', 3, $roles, TRUE),
-    'l_show_non-members' => array('Who is allowed to view/search non-members?', 2, $roles),
-    'l_show_email' => array('Who is allowed to view/search email addresses?', 0, $roles),
-    'l_show_real_names' => array('Who is allowed to view/search real names?', 0, $roles),
-    'x_more_permissions' => array('Activate role-based permissions in conjunction with the above.', FALSE, FALSE, TRUE),
-  );
-
-  /*
-  $advanced = array(
-    // Advanced.
-    'f_advanced' => array('<strong>NOT YET FULLY FUNCTIONAL!</strong> This section allows you to define a more flexible configuration for GroupAdmin, depending on group-type and/or individual group.'
-                        . '<ul><li>Using configuration per group-type, the main configuration values will be used as defaults.</li>'
-                        . '<li>Using configuration per group, the group-type and then main configuration values will be used as defaults.</li></ul>', TRUE, TRUE),
-    'x_configuration_per_group_type' => array('Provide a separate configuration for each type of group, accessible via content-type edit pages. '
-                        . 'Access requires <em>administer content types</em> permission.', FALSE, FALSE, TRUE),
-    'x_configuration_per_group' => array('Provide a separate configuration for each individual group.', FALSE, FALSE, TRUE),
-  );
-
-  if ($context) {
-    unset($access['l_basic_access']);
-    unset($access['x_more_permissions']);
-    $fields = array_merge($options, $access);
-  }
-  else {
-    $fields = array_merge($links, $options, $access, $advanced);
-  }
-  */
-  $fields = array_merge($links, $options, $access);
-  // Add configuration arrays from other modules.
-  $fields = array_merge($fields, _groupadmin_get_modules('config_fields'));
-
-  return $fields;
-}
-
-/**
- * Build the config form from $fields array.
- */
-function _groupadmin_settings_form_build($fields) {
-  // Build the form...
-
-  // Define skeletons for form elements.
-  // Note: we use single character key, but longer keys should work too.
-  $elements = array(
-    'n' => array('#type'=>'textfield', '#size'=>4, '#element_validate' => array('groupadmin_validate_posint')),
-    't' => array('#type'=>'textfield', '#size'=>30, '#maxlen'=>30),
-    'r' => array('#type'=>'radios'),
-    'l' => array('#type'=>'select'),
-    'x' => array('#type'=>'checkbox'),
-    's' => array('#type'=>'submit'),
-    'f' => array('#type'=>'fieldset'),
-  );
-
-  // Maps - these define how elements in the $fields array relate to FAPI attributes.
-  $maps = array(
-    'default' => array('#description', '#default_value', '#required'),
-    'select'  => array('#description', '#default_value', '#options'),
-    'radio'   => array('#description', '#default_value', '#options'),
-    'fieldset'=> array('#description', '#collapsed', '#collapsible'),
-    'submit'=> array('#default_value'), // Not complete!
-  );
-
-  // Loop through all fields, construct form elements and add them to the form...
-  foreach($fields as $key => $field) {
-
-    // Split fieldname into components: $element['#type'] and $element['#title'].
-    $element = array_combine(array('#type', '#title'), explode('_', $key, 2));
-    // Captialise title and replace underscores with spaces.
-    $element['#title'] = ucfirst(str_replace('_', ' ', $element['#title']));
-    // Copy default structure for this type (updates #type to FAPI #type).
-    $element = array_merge($element, $elements[$element['#type']]);
-    $type = $element['#type'];
-
-    // Copy values from $field to $element using the relevant $map.
-    $map = $maps[$type]? $maps[$type] : $maps['default'];
-    foreach($map as $n => $attribute)  $element[$attribute] = &$field[$n];
-
-    // If processing a fieldset, position it at top level.
-    if ($type == 'fieldset') {
-      $form[$section_name = $key] = $element;
-    }
-    // Otherwise create element inside current fieldset.
-    else {
-      $form[$section_name][$key] = $element;
-    }
-  }
-  //drupal_set_message(print_r($form, 1));
-  return $form;
-}
-
-/**
- * Build and return the complete config form.
- */
-function _groupadmin_settings_form($form_state, $context = '', $id = '') {
-  //drupal_set_message(sprintf('Settings form: [%s][%s][%s]', $form_state, $context, $id));
-  //drupal_set_message(sprintf('Form state: %s', print_r($form_state, 1)));
-
-  // Get fields (with default values) for form.
-  $fields = _groupadmin_settings_fields($context .= $id);
-
-  // Replace default values with current values from config.
-  $config = variable_get('groupadmin', array());
-
-  if ($context) {
-    foreach($config as $key => $value) {
-      if (isset($fields[$key])) {
-        $context_value =& $config[$context][$id][$key];
-        $fields[$key][1] = isset($context_value)? $context_value : $config[$key];
-      }
-    }
-  }
-  else {
-    foreach($config as $key => $value) {
-      if (isset($fields[$key])) {
-        $fields[$key][1] = $config[$key];
-      }
-    }
-  }
-
-  // Build the basic form.
-  $form = _groupadmin_settings_form_build($fields);
-
-  // Add validatation function(s) from other modules.
-  $form['#validate'] = _groupadmin_get_modules('config_validate');
-  $form['#validate'][] = '_groupadmin_settings_form_validate';
-  // Add buttons (etc.) using system_settings_form().
-  $form = system_settings_form($form);
-
-  // We want to use *our* submit function, so remove the one put there by system_settings_form().
-  unset($form['#submit']);
-
-  return $form;
-}
-
-/**
- * Validatation.
- */
-function _groupadmin_settings_form_validate($form, &$form_state) {
-  $values = $form_state['values'];
-
-  // Security check - Ensure that text entries do not contain invalid characters.
-  foreach($values as $key=>$value) {
-    // If it's a text-entry field and value does not match escaped value, report an error.
-    if (substr($key, 0, 2) == 't_' && $value != check_plain($value)) {
-      $tvars = array('%key' => $key, '%value' => $value);
-      $reason = t('Entry for %key: %value contains invalid characters.', $tvars);
-      form_set_error($key, $reason);
-    }
-  }
-
-  // Check that nodes actually exist.
-  foreach($values as $key => $value) {
-    if (substr($key, -5) == '_node' && $value && !node_load($value)) {
-      form_set_error($key, t('Node @nid does not exist.', array('@nid' => $value)));
-    }
-  }
-}
-
-/**
- * Submit function for settings form.
- * Pack values into an array, process update and rebuild menu if needed.
- */
-function _groupadmin_settings_form_submit($form, &$form_state) {
-  //drupal_set_message(print_r($form_state, 1), 'error');
-  //drupal_set_message(print_r($form, 1), 'warning');
-  //drupal_set_message(print_r($form['f_access_control'], 1), 'warning');
-
-  // Reference form_state['values'] for use later.
-  $values =& $form_state['values'];
-
-  // Get current config (used to test if menu rebuild is needed.)
-  $old_config = variable_get('groupadmin', array());
-
-  // We could skip these steps if "Reset to defaults" was selected, but we do them anyway.
-  if (TRUE) {
-    // Get config $fields.
-    $fields = _groupadmin_settings_fields();
-
-    // Copy relevant $values into $new_state.
-    $new_state['values']['op'] = $values['op'];
-    $new_state['values']['groupadmin'] = array_intersect_key($values, $fields);
-  }
-
-  // Process via systems_settings_form_submit() so that Drupal standard messages are displayed.
-  // @todo: Consider if really worth using system_settings_form.
-  system_settings_form_submit($form, $new_state);
-
-  // Reload new config from newly saved version ("Reset to defaults" may have been used.)
-  $new_config = variable_get('groupadmin', array());
-
-  // Check if menu needs to be rebuilt...
-  $changes = array_diff_assoc($new_config, $old_config);
-  foreach ($changes as $key => $value) {
-    if ($fields[$key][3]) {
-      menu_rebuild();
-      drupal_set_message('The menu has been rebuilt.');
-      break;
-    }
-  }
-}
-
-/**
- * Test if form field is an integer >= 0.
- * A value such as '1.0' is deliberately disallowed, even though mathematically valid.
- * If #required, also check that value is non-zero.
- */
-function groupadmin_validate_posint($element, &$form_state, $form) {
-  //drupal_set_message(print_r($elements, 1));
-  $value = $element['#value'];
-
-  if ($value !== '') {
-    $name = array('%name' => $element['#title']);
-    if (!is_numeric($value)) {
-      $msg = t('%name value should be numeric.', $name);
-    }
-    elseif ($value == 0 && $element['#required']) {
-      $msg = t('%name value should be greater than zero.', $name);
-    }
-    elseif (strval($value) !== strval(intval($value))) {
-      $msg = t('%name value should be a whole number.', $name);
-    }
-    elseif ($value < 0) {
-      $msg = t('%name value should not be negative.', $name);
-    }
-
-    if ($msg)  form_error($element, $msg);
-  }
-}
diff --git a/groupadmin.info b/groupadmin.info
index 86dbffd..a07c396 100644
--- a/groupadmin.info
+++ b/groupadmin.info
@@ -1,8 +1,6 @@
-; $Id:
 name = Group Admin
 description = Provides a searchable member list and simple administrative interface for memberhsip management.
 dependencies[] = og
 package = Organic groups
 version = 6.x-2.x-dev
 core = 6.x
-
diff --git a/groupadmin.install b/groupadmin.install
index 041a9cb..45710fa 100644
--- a/groupadmin.install
+++ b/groupadmin.install
@@ -24,4 +24,3 @@ function groupadmin_install() {
 function groupadmin_update_1() {
 }
 */
-
diff --git a/groupadmin.menu.inc b/groupadmin.menu.inc
new file mode 100644
index 0000000..743cb3d
--- /dev/null
+++ b/groupadmin.menu.inc
@@ -0,0 +1,146 @@
+<?php
+
+
+/********************************************************
+Original development by: netgenius.co.uk
+Commercial support is available from www.netgenius.co.uk
+Contact: drupal(a)netgenius.co.uk
+*********************************************************/
+
+
+/**
+ * Helper function for dynamic menu titles etc.
+ */
+function _groupadmin_menu_helper($node = NULL, $element = NULL) {
+  if(isset($node) && isset($node->$element)) {
+    return $node->$element;
+  }
+  else {
+    return '';
+  }
+}
+
+/**
+ * Implementation of hook_menu().
+ */
+function groupadmin_menu() {
+  // NB: Remember, titles and descriptions should NOT be wrapped in t() - http://drupal.org/node/140311
+
+  // Module configuration page.
+  $items['admin/og/groupadmin'] = array(
+    'title' => 'Group Admin configuration',
+    'access callback' => '_groupadmin_user_access',
+    'access arguments' => array('ga-admin'),
+    'description' => 'Configure the <em>Group Admin</em> module.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('_groupadmin_settings_form'),
+  );
+  
+  /*** this part is not finished!
+  // If enabled, extra configuration by group-type.
+  if(_groupadmin_settings('x_configuration_per_group_type')) {
+    // Add a menu item to the content-type edit page for each group type.
+    // Tried to do this using a single menu path with %  but it didn't work.'
+    $types = _groupadmin_group_types();
+    foreach($types as $type) {
+      $path = sprintf('admin/content/node-type/%s/groupadmin', $type);
+      $items[$path] = array(
+        'title' => 'GroupAdmin',
+        'access arguments' => array('administer content types'),
+        'description' => 'Configure <em>Group Admin</em> for .',
+        'page arguments' => array('_groupadmin_settings_form', 2, 3),
+        'page callback' => 'drupal_get_form',
+        'type' => MENU_LOCAL_TASK,
+      );
+    }
+  }
+  * ***/
+
+  // Fix-up 1 - put something at /og/users
+  $items['og/users'] = array(
+    'title' => 'Membership',
+    'access callback' => TRUE,
+    'page callback' => 'groupadmin_set_menu_path',
+    // Seems to work ok as callback or default (normal task.)
+    'type' => MENU_LOCAL_TASK,
+  );
+
+  // Fix-up 2 - og/users/%node
+  $items['og/users/%node'] = array(
+    'title callback' => '_groupadmin_menu_helper',
+    'title arguments' => array(2, 'title'), 
+
+    'access callback' => TRUE,
+    //'description' => 'description goes here',
+    'page callback' => 'groupadmin_set_menu_path',
+    'page arguments' => array(2),
+    'type' => MENU_CALLBACK,
+  );
+  
+  // Main page.
+  $main_page = array(
+    'title' => _groupadmin_settings('t_link_title'),
+    'access callback' => '_groupadmin_access',
+    'access arguments' => array(1),
+    'description' => 'Group membership and administration.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('_groupadmin_manage', 1),
+    'type' => MENU_LOCAL_TASK,
+  );
+
+  // Depending on configuration, create more menu paths...
+  if(_groupadmin_settings('x_show_on_node_page')) {
+    // Create tab on node page.
+    $items['node/%node/groupadmin'] = $main_page;
+  }
+
+  // Settings for show on member page...
+  // Note, with OG Views integration, these may not work unless paths for Views are suitably modified.
+  $main_page['page arguments'] = array('_groupadmin_manage', 2);
+  $main_page['access arguments'] = array(2);
+  $main_page['weight'] = -1;
+
+  if (_groupadmin_settings('x_show_on_members_page')) {
+    $items['og/users/%node/groupadmin'] = $main_page;
+  }
+  if (_groupadmin_settings('x_use_standard_path')) {
+    $items['og/users/%node/list'] = $main_page;
+  }
+
+  // Provide update/confirmation page.
+  // Args are gid, operation, uid, username.
+  $items['og/groupadmin/%/%/%/%'] = array(
+    'title' => 'Update membership',
+    'access callback' => '_groupadmin_access_admin',
+    'access arguments' => array(2),
+    'page callback' => '_groupadmin_update',
+    'page arguments' => array(2, 3, 4, 5),
+    'type' => MENU_CALLBACK,
+  );
+
+  return $items;
+}
+
+function groupadmin_set_menu_path($group = NULL) {
+
+  if (isset($group->nid)) {
+    $dest = 'node/' . $group->nid;
+  }
+  else {
+    $dest = 'og/my';
+  }
+  $dest = url($dest);
+  if ($dest[0] == '/')  $dest = substr($dest, 1);
+
+  drupal_goto($dest, NULL, NULL, 301);
+}
+
+/**
+* Implementation of hook_menu_alter().
+* If enabled, remove the standard "add users" tab.
+*/
+function groupadmin_menu_alter(&$items) {
+  if (_groupadmin_settings('x_remove_standard_link')) {
+    unset($items['og/users/%node/add_user']);
+  }
+}
diff --git a/groupadmin.menu.inc.php b/groupadmin.menu.inc.php
deleted file mode 100644
index 743cb3d..0000000
--- a/groupadmin.menu.inc.php
+++ /dev/null
@@ -1,146 +0,0 @@
-<?php
-
-
-/********************************************************
-Original development by: netgenius.co.uk
-Commercial support is available from www.netgenius.co.uk
-Contact: drupal(a)netgenius.co.uk
-*********************************************************/
-
-
-/**
- * Helper function for dynamic menu titles etc.
- */
-function _groupadmin_menu_helper($node = NULL, $element = NULL) {
-  if(isset($node) && isset($node->$element)) {
-    return $node->$element;
-  }
-  else {
-    return '';
-  }
-}
-
-/**
- * Implementation of hook_menu().
- */
-function groupadmin_menu() {
-  // NB: Remember, titles and descriptions should NOT be wrapped in t() - http://drupal.org/node/140311
-
-  // Module configuration page.
-  $items['admin/og/groupadmin'] = array(
-    'title' => 'Group Admin configuration',
-    'access callback' => '_groupadmin_user_access',
-    'access arguments' => array('ga-admin'),
-    'description' => 'Configure the <em>Group Admin</em> module.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('_groupadmin_settings_form'),
-  );
-  
-  /*** this part is not finished!
-  // If enabled, extra configuration by group-type.
-  if(_groupadmin_settings('x_configuration_per_group_type')) {
-    // Add a menu item to the content-type edit page for each group type.
-    // Tried to do this using a single menu path with %  but it didn't work.'
-    $types = _groupadmin_group_types();
-    foreach($types as $type) {
-      $path = sprintf('admin/content/node-type/%s/groupadmin', $type);
-      $items[$path] = array(
-        'title' => 'GroupAdmin',
-        'access arguments' => array('administer content types'),
-        'description' => 'Configure <em>Group Admin</em> for .',
-        'page arguments' => array('_groupadmin_settings_form', 2, 3),
-        'page callback' => 'drupal_get_form',
-        'type' => MENU_LOCAL_TASK,
-      );
-    }
-  }
-  * ***/
-
-  // Fix-up 1 - put something at /og/users
-  $items['og/users'] = array(
-    'title' => 'Membership',
-    'access callback' => TRUE,
-    'page callback' => 'groupadmin_set_menu_path',
-    // Seems to work ok as callback or default (normal task.)
-    'type' => MENU_LOCAL_TASK,
-  );
-
-  // Fix-up 2 - og/users/%node
-  $items['og/users/%node'] = array(
-    'title callback' => '_groupadmin_menu_helper',
-    'title arguments' => array(2, 'title'), 
-
-    'access callback' => TRUE,
-    //'description' => 'description goes here',
-    'page callback' => 'groupadmin_set_menu_path',
-    'page arguments' => array(2),
-    'type' => MENU_CALLBACK,
-  );
-  
-  // Main page.
-  $main_page = array(
-    'title' => _groupadmin_settings('t_link_title'),
-    'access callback' => '_groupadmin_access',
-    'access arguments' => array(1),
-    'description' => 'Group membership and administration.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('_groupadmin_manage', 1),
-    'type' => MENU_LOCAL_TASK,
-  );
-
-  // Depending on configuration, create more menu paths...
-  if(_groupadmin_settings('x_show_on_node_page')) {
-    // Create tab on node page.
-    $items['node/%node/groupadmin'] = $main_page;
-  }
-
-  // Settings for show on member page...
-  // Note, with OG Views integration, these may not work unless paths for Views are suitably modified.
-  $main_page['page arguments'] = array('_groupadmin_manage', 2);
-  $main_page['access arguments'] = array(2);
-  $main_page['weight'] = -1;
-
-  if (_groupadmin_settings('x_show_on_members_page')) {
-    $items['og/users/%node/groupadmin'] = $main_page;
-  }
-  if (_groupadmin_settings('x_use_standard_path')) {
-    $items['og/users/%node/list'] = $main_page;
-  }
-
-  // Provide update/confirmation page.
-  // Args are gid, operation, uid, username.
-  $items['og/groupadmin/%/%/%/%'] = array(
-    'title' => 'Update membership',
-    'access callback' => '_groupadmin_access_admin',
-    'access arguments' => array(2),
-    'page callback' => '_groupadmin_update',
-    'page arguments' => array(2, 3, 4, 5),
-    'type' => MENU_CALLBACK,
-  );
-
-  return $items;
-}
-
-function groupadmin_set_menu_path($group = NULL) {
-
-  if (isset($group->nid)) {
-    $dest = 'node/' . $group->nid;
-  }
-  else {
-    $dest = 'og/my';
-  }
-  $dest = url($dest);
-  if ($dest[0] == '/')  $dest = substr($dest, 1);
-
-  drupal_goto($dest, NULL, NULL, 301);
-}
-
-/**
-* Implementation of hook_menu_alter().
-* If enabled, remove the standard "add users" tab.
-*/
-function groupadmin_menu_alter(&$items) {
-  if (_groupadmin_settings('x_remove_standard_link')) {
-    unset($items['og/users/%node/add_user']);
-  }
-}
diff --git a/groupadmin.misc.inc b/groupadmin.misc.inc
new file mode 100644
index 0000000..0e41689
--- /dev/null
+++ b/groupadmin.misc.inc
@@ -0,0 +1,95 @@
+<?php
+
+
+/********************************************************
+Original development by: netgenius.co.uk
+Commercial support is available from www.netgenius.co.uk
+Contact: drupal(a)netgenius.co.uk
+*********************************************************/
+
+/**
+ * Check if a required function exists, display an error message if not.
+ */
+function _groupadmin_checkfunc($func_name) {
+  if(is_callable($func_name))  return TRUE;
+
+  $msg = sprintf('[groupadmin] %s: %s()', t('Required function does not exist'), $func_name);
+  drupal_set_message($msg, 'error');
+  return FALSE;
+}
+
+/**
+ * Handle session data, used to store "sticky" values on the search form.
+ */
+function _groupadmin_session($key, $value = NULL) {
+  global $_SESSION;
+  $session_data =& $_SESSION['groupadmin'];
+  //if ($value === NULL) drupal_set_message(sprintf('read session (%s) -> %s', $key, print_r($session_data, 1)));
+
+  if ($value === NULL) {
+    $value = $session_data[$key];
+  }
+  elseif ($value === 'DELETE') {
+    unset($session_data[$key]);
+  }
+  else {
+    $session_data[$key] = $value;
+  }
+
+  return $value;
+}
+
+/**
+ * Load and statically cache the group node.
+ * Return entire node or specified element.
+ */
+function _groupadmin_get_group($gid, $element = FALSE) {
+  static $node;
+  if ($node->gid != $gid)  $node = node_load($gid);
+  return $element? $node->$element : $node;
+}
+
+/**
+ * Test if user is member of Group, via safe call to OG function.
+ */
+function _groupadmin_is_group_member($gid, $uid) {
+  return (_groupadmin_checkfunc('og_is_group_member'))? og_is_group_member($gid, FALSE, $uid) : FALSE;
+}
+
+/**
+ * Get an array of content types which are Groups.
+ */
+function _groupadmin_group_types() {
+  // Current versions of OG use og_get_types.
+  if (is_callable('og_get_types')) {
+    $types = og_get_types('group');
+  }
+  else {
+    $types = variable_get('og_node_types', array('og'));
+  }
+
+  return empty($types)? FALSE : $types;
+}
+
+/**
+ * Get data from other modules via hook_groupadmin_ functions.
+ */
+function _groupadmin_get_modules($op) {
+  $hook = 'hook_groupadmin_' . $op;
+  $modules = module_implements($hook);
+  //drupal_set_message('modules: ' . print_r($modules, 1));
+  $data = array();
+  foreach($modules as $module)  {
+    $data = array_merge($data, module_invoke($module, $hook));
+  }
+  return $data;
+}
+
+/**
+ * Get raw destination using drupal_get_destination()
+ */
+function _groupadmin_get_destination()  {
+  // It seems we need to urldecode twice?
+  // return urldecode(urldecode(drupal_get_destination()));
+  return urldecode(drupal_get_destination());
+}
diff --git a/groupadmin.misc.inc.php b/groupadmin.misc.inc.php
deleted file mode 100644
index 74a0cbf..0000000
--- a/groupadmin.misc.inc.php
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-
-
-/********************************************************
-Original development by: netgenius.co.uk
-Commercial support is available from www.netgenius.co.uk
-Contact: drupal(a)netgenius.co.uk
-*********************************************************/
-
-/**
- * Check if a required function exists, display an error message if not.
- */
-function _groupadmin_checkfunc($func_name) {
-  if(is_callable($func_name))  return true;
-
-  $msg = sprintf('[groupadmin] %s: %s()', t('Required function does not exist'), $func_name);
-  drupal_set_message($msg, 'error');
-  return false;
-}
-
-/**
- * Handle session data, used to store "sticky" values on the search form.
- */
-function _groupadmin_session($key, $value = null) {
-  global $_SESSION;
-  $session_data =& $_SESSION['groupadmin'];
-  //if ($value === null) drupal_set_message(sprintf('read session (%s) -> %s', $key, print_r($session_data, 1)));
-
-  if ($value === null) {
-    $value = $session_data[$key];
-  }
-  elseif ($value === 'DELETE') {
-    unset($session_data[$key]);
-  }
-  else {
-    $session_data[$key] = $value;
-  }
-
-  return $value;
-}
-
-/**
- * Load and statically cache the group node.
- * Return entire node or specified element.
- */
-function _groupadmin_get_group($gid, $element = FALSE) {
-  static $node;
-  if ($node->gid != $gid)  $node = node_load($gid);
-  return $element? $node->$element : $node;
-}
-
-/**
- * Test if user is member of Group, via safe call to OG function.
- */
-function _groupadmin_is_group_member($gid, $uid) {
-  return (_groupadmin_checkfunc('og_is_group_member'))? og_is_group_member($gid, FALSE, $uid) : FALSE;
-}
-
-/**
- * Get an array of content types which are Groups.
- */
-function _groupadmin_group_types() {
-  // Current versions of OG use og_get_types.
-  if (is_callable('og_get_types')) {
-    $types = og_get_types('group');
-  }
-  else {
-    $types = variable_get('og_node_types', array('og'));
-  }
-
-  return empty($types)? FALSE : $types;
-}
-
-/**
- * Get data from other modules via hook_groupadmin_ functions.
- */
-function _groupadmin_get_modules($op) {
-  $hook = 'hook_groupadmin_' . $op;
-  $modules = module_implements($hook);
-  //drupal_set_message('modules: ' . print_r($modules, 1));
-  $data = array();
-  foreach($modules as $module)  {
-    $data = array_merge($data, module_invoke($module, $hook));
-  }
-  return $data;
-}
-
-/**
- * Get raw destination using drupal_get_destination()
- */
-function _groupadmin_get_destination()  {
-  // It seems we need to urldecode twice?
-  // return urldecode(urldecode(drupal_get_destination()));
-  return urldecode(drupal_get_destination());
-}
diff --git a/groupadmin.module b/groupadmin.module
index 4b22597..425775f 100644
--- a/groupadmin.module
+++ b/groupadmin.module
@@ -10,10 +10,10 @@ Contact: drupal(a)netgenius.co.uk
 
 *********************************************************/
 
-require_once('groupadmin.config.inc.php');
-require_once('groupadmin.access.inc.php');
-require_once('groupadmin.menu.inc.php');
-require_once('groupadmin.misc.inc.php');
+require_once('groupadmin.config.inc');
+require_once('groupadmin.access.inc');
+require_once('groupadmin.menu.inc');
+require_once('groupadmin.misc.inc');
 
 /**
  * Generate a list of users matching search criteria.
diff --git a/groupadmin_cp/contact_profile.txt b/groupadmin_cp/contact_profile.txt
index e18b1c1..6ce0dfd 100644
--- a/groupadmin_cp/contact_profile.txt
+++ b/groupadmin_cp/contact_profile.txt
@@ -195,4 +195,3 @@ $content['extra']  = array (
   'path' => '30',
   'attachments' => '30',
 );
-
diff --git a/groupadmin_cp/groupadmin_cp.info b/groupadmin_cp/groupadmin_cp.info
index c006778..ad148d0 100644
--- a/groupadmin_cp/groupadmin_cp.info
+++ b/groupadmin_cp/groupadmin_cp.info
@@ -1,4 +1,3 @@
-; $Id:
 name = Group Admin CP
 description = Allows GroupAdmin to work with user data stored in CCK nodes, typically for use with <a href=http://drupal.org/project/content_profile>Content Profile</a>.
 dependencies[] = groupadmin
@@ -6,4 +5,3 @@ dependencies[] = content
 package = Organic groups
 version = 6.x-2.x-dev
 core = 6.x
-
diff --git a/groupadmin_cp/groupadmin_cp.install b/groupadmin_cp/groupadmin_cp.install
index 89c987b..572a96d 100644
--- a/groupadmin_cp/groupadmin_cp.install
+++ b/groupadmin_cp/groupadmin_cp.install
@@ -20,8 +20,8 @@ function groupadmin_cp_uninstall() {
  * Implementation of hook_install().
  */
 function groupadmin_cp_install() {
-  $msg = 'Please visit the !link page to configure Group Admin CP.';
-  $link = l(t('configuration'), 'admin/og/groupadmin');
+  $msg = '!link';
+  $link = l(t('Configure Group Admin CP'), 'admin/og/groupadmin');
   drupal_set_message(t($msg, array('!link' => $link)), 'warning');
 }
 
@@ -33,4 +33,3 @@ function groupadmin_cp_install() {
 function groupadmin_cp_update_1() {
 }
 */
-
diff --git a/groupadmin_profile/groupadmin_profile.info b/groupadmin_profile/groupadmin_profile.info
index 970ffef..308dcd6 100644
--- a/groupadmin_profile/groupadmin_profile.info
+++ b/groupadmin_profile/groupadmin_profile.info
@@ -1,4 +1,3 @@
-; $Id:
 name = Group Admin Profile
 description = Allows GroupAdmin to work with user data stored using standard Profile module.
 dependencies[] = groupadmin
@@ -6,4 +5,3 @@ dependencies[] = profile
 package = Organic groups
 version = 6.x-2.x-dev
 core = 6.x
-
diff --git a/groupadmin_profile/groupadmin_profile.install b/groupadmin_profile/groupadmin_profile.install
index e9527ad..d1c077c 100644
--- a/groupadmin_profile/groupadmin_profile.install
+++ b/groupadmin_profile/groupadmin_profile.install
@@ -20,8 +20,8 @@ function groupadmin_profile_uninstall() {
  * Implementation of hook_install().
  */
 function groupadmin_profile_install() {
-  $msg = 'Please visit the !link page to configure GroupAdmin Profile.';
-  $link = l(t('configuration'), 'admin/og/groupadmin');
+  $msg = '!link';
+  $link = l(t('Configure GroupAdmin Profile'), 'admin/og/groupadmin');
   drupal_set_message(t($msg, array('!link' => $link)), 'warning');
 }
 
@@ -33,4 +33,3 @@ function groupadmin_profile_install() {
 function groupadmin_profile_update_1() {
 }
 */
-
