diff --git a/gigya/GigyaUser.inc b/gigya/GigyaUser.inc
new file mode 100644
index 0000000..184dc33
--- /dev/null
+++ b/gigya/GigyaUser.inc
@@ -0,0 +1,201 @@
+<?php
+
+/**
+ * Undocumented Class!
+ */
+class GigyaUser {
+
+  /**
+   * Undocumented Variable!
+   *
+   * @var
+   */
+  public $uid;
+
+  /**
+   * Undocumented Variable!
+   *
+   * @var
+   */
+  private $userinfo;
+
+  /**
+   * Constructs a GigyaUser object.
+   *
+   * @param $gigya_uid
+   *   Undocumnted Parameter!
+   */
+  public function __construct($gigya_uid) {
+    $this->uid = $gigya_uid;
+  }
+
+  /**
+   * Undocumented Function!
+   *
+   * @param $refresh
+   *   Undocumented Parameter!
+   */
+  public function getUserInfo($refresh = FALSE) {
+    //if (!empty($this->userinfo) && !$refresh) return $this->userinfo;
+    return gigya_get_user_info($this->uid);
+  }
+
+  /**
+   * Undocumented Function!
+   *
+   * @param $content
+   *   Undocumented Parameter!
+   */
+  public function publishUserAction($content) {
+    if (!$this->hasCapability('Actions')) {
+      return FALSE;
+    }
+    return gigya_publish_user_action($this->uid, $content);
+  }
+
+  /**
+   * Undocumented Function!
+   *
+   * @param $account
+   *   Undocumented Parameter!
+   */
+  public static function load(&$account) {
+    //$account->gigya = new GigyaUser($account->uid);
+    isset($account->uid) ? $account->gigya = new GigyaUser($account->uid): $account->gigya = NULL;
+  }
+
+  /**
+   * Redirects to a logout URL where JavaScript will be added to the page.
+   */
+  public function logout() {
+    /*
+     * I don't like doing this on a separate page, it's kinda fragile,
+     * but it's the best I can figure out for now since the session gets
+     * destroyed by the user_logout function.
+     */
+    global $user, $base_path;
+    $dest = $base_path;
+    if (!empty($_GET['destination'])) {
+      $dest = $_GET['destination'];
+    }
+    $_GET['destination'] = 'socialize-logout?destination=' . urlencode($dest);
+  }
+
+  /**
+   * Undocumented Function!
+   */
+    public function getFriends($params = array()) {
+    return gigya_get_friends_info($this->uid, $params);
+  }
+
+
+  /**
+   * Undocumented Function!
+   */
+  public function getCapabilities() {
+    if ($bio = $this->getUserInfo()) {
+      $capabilities = split(', ', $bio['capabilities']);
+      array_walk($capabilities, '_gigya_trim_value');
+      return $capabilities;
+    }
+    else {
+      return array();
+    }
+  }
+
+  /**
+   * Undocumented Function!
+   *
+   * @param $capability
+   *   Undocumented Parameter!
+   */
+  public function hasCapability($capability) {
+    $capabilities = $this->getCapabilities();
+    return array_search($capability, $capabilities);
+  }
+
+  /**
+   * Maps extended profile fields that weren't on the registration form.
+   *
+   * @param $edit
+   *   Undocumented Parameter!
+   */
+  public function mapExtendedProfileFields($edit) {
+    $bio = $this->getUserInfo();
+
+    if (module_exists('profile')) {
+      $temp_edit = array();
+      if ($profile_categories = profile_categories()) {
+
+        foreach ($profile_categories as $category) {
+          $result = _profile_get_fields($category['name']);
+          foreach ($result as $field) {
+            // Only attempt to set this variable if we've mapped it and
+            // it isn't already set elsewhere.
+            if (variable_get('gigya_profile_' . $field->name, '') != '0' && !isset($edit[$field->name])) {
+              $bio_assoc = variable_get('gigya_profile_' . $field->name, '');
+              $temp_edit[$field->name] = $bio[$bio_assoc];
+            }
+          }
+          /*
+           * This could potentially cause conflicts with other modules not
+           * expecting that this will be called. Disable mapping of
+           * extended profile fields if this causes a problem. This could
+           * probably be replaced by profile_save_profile but I haven't
+           * fully investigated it.
+           */
+          user_save($account, $temp_edit, $category['name']);
+        }
+      }
+    }
+  }
+
+  /**
+   * Undocumented Function!
+   *
+   * @param $uid
+   *   Undocumented Parameter!
+   */
+  public function setUID($uid) {
+    return gigya_set_uid($this->uid, $uid);
+  }
+
+
+  /**
+   * Informs Gigya that this user has completed site registration
+   */
+  public function notifyRegistration($uid) {
+    return gigya_notify_registration($this->uid, $uid);
+  }
+
+  /**
+   * Undocumented Function!
+   */
+  public function deleteAccount() {
+    gigya_delete_account($this->uid);
+    return TRUE;
+  }
+
+  /**
+   * Undocumented Function!
+   */
+  public static function userFromUrl() {
+    if (!empty($_GET['signature']) && !empty($_GET['timestamp']) && !empty($_GET['UID'])) {
+      // First, verify signature.
+      $localkey = _gigya_verify_signature($_GET['timestamp'], $_GET['UID'], variable_get('gigya_SecretKey', FALSE));
+      if ($localkey != $_GET['signature']) {
+        drupal_set_message(t('Unable to authenticate. Gigya signature does not match.'), 'error');
+        if ($user->uid == 1) {
+          drupal_set_message(t('Signature is %gigya, Site sig is %site.', array('%gigya' => $form_values['signature'], '%site' => $localkey)), 'error');
+        }
+        return FALSE;
+      }
+      else {
+        return new GigyaUser($_GET['UID']);
+      }
+    }
+    else {
+      return FALSE;
+    }
+  }
+}
\ No newline at end of file
diff --git a/gigya/gigya.info b/gigya/gigya.info
index 97c7ffc..633f1b8 100644
--- a/gigya/gigya.info
+++ b/gigya/gigya.info
@@ -18,6 +18,7 @@ files[] = gigya.inc
 files[] = gigya.install
 files[] = gigya.module
 files[] = gigya.pages.inc
+files[] = GigyaUser.inc
 
 ; Information added by drupal.org packaging script on 2011-08-15
 version = "7.x-1.x-dev"
diff --git a/gigya/gigya.module b/gigya/gigya.module
index e8bd520..de91c44 100644
--- a/gigya/gigya.module
+++ b/gigya/gigya.module
@@ -1336,208 +1336,6 @@ function gigya_link_accounts_form_submit(&$form, &$form_state) {
   return;
 }
 
-
-
-/**
- * Undocumented Class!
- */
-class GigyaUser {
-
-  /**
-   * Undocumented Variable!
-   *
-   * @var
-   */
-  public $uid;
-
-  /**
-   * Undocumented Variable!
-   *
-   * @var
-   */
-  private $userinfo;
-
-  /**
-   * Constructs a GigyaUser object.
-   *
-   * @param $gigya_uid
-   *   Undocumnted Parameter!
-   */
-  public function __construct($gigya_uid) {
-    $this->uid = $gigya_uid;
-  }
-
-  /**
-   * Undocumented Function!
-   *
-   * @param $refresh
-   *   Undocumented Parameter!
-   */
-  public function getUserInfo($refresh = FALSE) {
-    //if (!empty($this->userinfo) && !$refresh) return $this->userinfo;
-    return gigya_get_user_info($this->uid);
-  }
-
-  /**
-   * Undocumented Function!
-   *
-   * @param $content
-   *   Undocumented Parameter!
-   */
-  public function publishUserAction($content) {
-    if (!$this->hasCapability('Actions')) {
-      return FALSE;
-    }
-    return gigya_publish_user_action($this->uid, $content);
-  }
-
-  /**
-   * Undocumented Function!
-   *
-   * @param $account
-   *   Undocumented Parameter!
-   */
-  public static function load(&$account) {
-    //$account->gigya = new GigyaUser($account->uid);
-    isset($account->uid) ? $account->gigya = new GigyaUser($account->uid): $account->gigya = NULL;
-  }
-
-  /**
-   * Redirects to a logout URL where JavaScript will be added to the page.
-   */
-  public function logout() {
-    /*
-     * I don't like doing this on a separate page, it's kinda fragile,
-     * but it's the best I can figure out for now since the session gets
-     * destroyed by the user_logout function.
-     */
-    global $user, $base_path;
-    $dest = $base_path;
-    if (!empty($_GET['destination'])) {
-      $dest = $_GET['destination'];
-    }
-    $_GET['destination'] = 'socialize-logout?destination=' . urlencode($dest);
-  }
-
-  /**
-   * Undocumented Function!
-   */
-    public function getFriends($params = array()) {
-    return gigya_get_friends_info($this->uid, $params);
-  }
-
-
-  /**
-   * Undocumented Function!
-   */
-  public function getCapabilities() {
-    if ($bio = $this->getUserInfo()) {
-      $capabilities = split(', ', $bio['capabilities']);
-      array_walk($capabilities, '_gigya_trim_value');
-      return $capabilities;
-    }
-    else {
-      return array();
-    }
-  }
-
-  /**
-   * Undocumented Function!
-   *
-   * @param $capability
-   *   Undocumented Parameter!
-   */
-  public function hasCapability($capability) {
-    $capabilities = $this->getCapabilities();
-    return array_search($capability, $capabilities);
-  }
-
-  /**
-   * Maps extended profile fields that weren't on the registration form.
-   *
-   * @param $edit
-   *   Undocumented Parameter!
-   */
-  public function mapExtendedProfileFields($edit) {
-    $bio = $this->getUserInfo();
-
-    if (module_exists('profile')) {
-      $temp_edit = array();
-      if ($profile_categories = profile_categories()) {
-
-        foreach ($profile_categories as $category) {
-          $result = _profile_get_fields($category['name']);
-          foreach ($result as $field) {
-            // Only attempt to set this variable if we've mapped it and
-            // it isn't already set elsewhere.
-            if (variable_get('gigya_profile_' . $field->name, '') != '0' && !isset($edit[$field->name])) {
-              $bio_assoc = variable_get('gigya_profile_' . $field->name, '');
-              $temp_edit[$field->name] = $bio[$bio_assoc];
-            }
-          }
-          /*
-           * This could potentially cause conflicts with other modules not
-           * expecting that this will be called. Disable mapping of
-           * extended profile fields if this causes a problem. This could
-           * probably be replaced by profile_save_profile but I haven't
-           * fully investigated it.
-           */
-          user_save($account, $temp_edit, $category['name']);
-        }
-      }
-    }
-  }
-
-  /**
-   * Undocumented Function!
-   *
-   * @param $uid
-   *   Undocumented Parameter!
-   */
-  public function setUID($uid) {
-    return gigya_set_uid($this->uid, $uid);
-  }
-
-
-  /**
-   * Informs Gigya that this user has completed site registration
-   */
-  public function notifyRegistration($uid) {
-    return gigya_notify_registration($this->uid, $uid);
-  }
-
-  /**
-   * Undocumented Function!
-   */
-  public function deleteAccount() {
-    gigya_delete_account($this->uid);
-    return TRUE;
-  }
-
-  /**
-   * Undocumented Function!
-   */
-  public static function userFromUrl() {
-    if (!empty($_GET['signature']) && !empty($_GET['timestamp']) && !empty($_GET['UID'])) {
-      // First, verify signature.
-      $localkey = _gigya_verify_signature($_GET['timestamp'], $_GET['UID'], variable_get('gigya_SecretKey', FALSE));
-      if ($localkey != $_GET['signature']) {
-        drupal_set_message(t('Unable to authenticate. Gigya signature does not match.'), 'error');
-        if ($user->uid == 1) {
-          drupal_set_message(t('Signature is %gigya, Site sig is %site.', array('%gigya' => $form_values['signature'], '%site' => $localkey)), 'error');
-        }
-        return FALSE;
-      }
-      else {
-        return new GigyaUser($_GET['UID']);
-      }
-    }
-    else {
-      return FALSE;
-    }
-  }
-}
-
 /*
  * Example of a hook_gigya_shareui_alter function.
  *
