--- username_check.module	2007-07-24 04:19:23.000000000 -0400
+++ username_check.module.new	2008-04-07 22:15:55.125000000 -0400
@@ -4,31 +4,31 @@
  * Implementation of hook_form_alter().
  */
 function username_check_form_alter($form_id, &$form) {
-
   if ('user_register' == $form_id) {
     username_check_load_css();
     username_check_load_js();
-    username_check_path_form($form);
+    username_check_path_form(&$form);
   }
-
 }
 
 /**
  * Build a username check form.
  */
 function username_check_path_form(&$form) {
-  $form['username_button'] = array(
+  $form['account']['name']['#weight'] = -40;
+  $form['account']['username_button'] = array(
     '#type' => 'button',
     '#value' => t('Check availability'),
+	'#weight' => -39,
   );
-  $form['username_message'] = array(
+  $form['account']['username_message'] = array(
     '#type' => 'markup',
     '#prefix' => '<div id="username-message" class="username-message">',
     '#value' => true,
-    '#suffix' => '</div>'
+    '#suffix' => '</div>',
+	'#weight' => -38,
   );
 }
-
 /**
  * Load CSS file.
  */
@@ -55,7 +55,7 @@ function username_check_load_js() {
 function username_check_menu($may_cache) {
   $items  = array();
 
-  if($may_cache) {
+  if ($may_cache) {
     $items[] = array(
       'path' => 'username_check/isunique',
       'title' => 'Username check',
@@ -68,7 +68,7 @@ function username_check_menu($may_cache)
 }
 
 /**
- * Set browser not to cache AJAX return ersults.
+ * Set browser not to cache AJAX return results.
  */
 function username_check_set_header_nocache() {
   header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
@@ -90,7 +90,7 @@ function username_check_menu_isunique() 
 //  $output['username'] = $username;
   if (is_array($user) && !empty($user)) {
     $output['exists'] = true;
-    $output['msg'] = t('Unfortunatly, username %username is not available!', array('%username' => $user['name']));
+    $output['msg'] = t('Username %username is not available.', array('%username' => $user['name']));
   } else {
     $output['exists'] = false;
     $output['msg'] = t('Username %username is available.', array('%username' => $username));
