diff --git a/userloginbar.admin.inc b/userloginbar.admin.inc
new file mode 100644
index 0000000..f26eed6
--- /dev/null
+++ b/userloginbar.admin.inc
@@ -0,0 +1,18 @@
+<?php
+/*
+ * @file
+ * Function file to administer the userloginbar module settings.
+ */
+
+/**
+ * Provides the userloginbar settings form.
+ */
+function userloginbar_admin_settings() {
+  $form = array();
+  $form['disable_welcome_box'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Check this box if you want to disable welcome box when the user logs in!'),
+    '#default_value' => variable_get('disable_welcome_box', FALSE),
+  );
+  return system_settings_form($form);
+}
diff --git a/userloginbar.info b/userloginbar.info
index 91581f6..136b973 100644
--- a/userloginbar.info
+++ b/userloginbar.info
@@ -1,15 +1,7 @@
-; $Id: userloginbar.info,v 1.1.2.1 2009/01/17 17:58:12 ebizondrupalservices Exp $
 name = User Login Bar
 description = Module that provides a new straight user login bar block
 package = User Login bar
-version = "6.x-1.x"
-core = "6.x"
-project = "userloginbar"
-
-
-; Information added by drupal.org packaging script on 2009-01-17
-version = "6.x-1.0"
-core = "6.x"
-project = "userloginbar"
-datestamp = "1232216138"
-
+core = 7.x
+version = 7.x-1.x-dev
+project = userloginbar
+files[] = userloginbar.css
diff --git a/userloginbar.install b/userloginbar.install
new file mode 100644
index 0000000..e3cc8fa
--- /dev/null
+++ b/userloginbar.install
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @file
+ * Install, update and uninstall functions for the userloginbar module.
+ */
+
+/**
+ * Implements hook_uninstall().
+ */
+function userloginbar_uninstall() {
+  variable_del('disable_welcome_box');
+}
\ No newline at end of file
diff --git a/userloginbar.module b/userloginbar.module
index 18b4a1b..00e6438 100644
--- a/userloginbar.module
+++ b/userloginbar.module
@@ -1,43 +1,54 @@
 <?php
-// $Id: userloginbar.module,v 1.1.2.1 2009/01/17 17:58:12 ebizondrupalservices Exp $
-
 
 /*
  * Userloginbar is a module written by developers at Ebizon Technologies (www.ebizontek.com). It is the implementation of http://drupal.org/node/92657#comment-792952. This module creates a new user login bar block.
  */
 
 /**
- * Implementation of hook_menu().
+ * Implements hook_menu().
  */
 function userloginbar_menu() {
 
   $items = array();
 
-  $items['admin/settings/userloginbar'] = array(
-    'title' => 'UserloginBar Settings',
+  $items['admin/config/userloginbar'] = array(
+    'title' => 'UserLoginBar settings',
+    'description' => 'UserloginBar Settings',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('userloginbar_admin'),
-    'access arguments' => array('administrator content'),
+    'page arguments' => array('userloginbar_admin_settings'),
+    'access arguments' => array('administer site configuration'),
+    'type' => MENU_NORMAL_ITEM,
+    'file' => 'userloginbar.admin.inc',
   );
-
   return $items;
 }
 
-/** implementing the new user login block */
-function userloginbar_block($op = 'list', $delta = 0) {
-  if ($op == 'list') {
-    $blocks[0]['info'] = t("User Login Bar Block");
-    return $blocks;
-  }
-  elseif ($op == 'view') {
+/**
+ * Implements hook_block_info().
+ */
+function userloginbar_block_info() {
+  $blocks['userloginbarblock'] = array(
+    'info' => t("User Login Bar Block"),
+    'cache' => DRUPAL_NO_CACHE,
+  );
+  return $blocks;
+}
 
-    $block['content'] = theme('userloginbar');
-    return $block;
+/**
+ * Implements hook_block_view().
+ */
+function userloginbar_block_view($delta = '') {
+  $block = array();
+  switch ($delta) {
+    case 'userloginbarblock':
+      $block['content'] = theme('userloginbar');
+      break;
   }
+  return $block;
 }
 
 /**
- * Implementation of hook_theme()...
+ * Implements hook_theme().
  */
 function userloginbar_theme() {
   return array(
@@ -49,7 +60,7 @@ function userloginbar_theme() {
  * Theming function for messages.
  */
 function theme_userloginbar() {
-  drupal_add_css(drupal_get_path('module', 'userloginbar') .'/userloginbar.css');
+  drupal_add_css(drupal_get_path('module', 'userloginbar') . '/userloginbar.css');
   global $user;
   $output = '';
 
@@ -59,27 +70,46 @@ function theme_userloginbar() {
 
   }
   if (!$user->uid) {
-    $output .= drupal_get_form('user_login_block');
+    $output .= drupal_render(drupal_get_form('user_login_block'));
   }
-  else if (!variable_get('disable_welcome_box', FALSE)) {
-    $output .= t('<p class="user-info">Hi !user, welcome back.</p>', array('!user' => theme('username', $user)));
-
-    $output .= theme('item_list', array(
-        l(t('Your account'), 'user/'. $user->uid, array('title' => t('Edit your account'))),
-        l(t('Sign out'), 'logout'),
-      ));
+  elseif (!variable_get('disable_welcome_box', FALSE)) {
+
+    $output .= t('<p class="user-info">Hi !user, welcome back.</p>',
+      array('!user' =>
+        theme_username(
+          array(
+            'account' => $user,
+            'name' => $user->name,
+            'extra' => NULL,
+            'attributes_array' => array(),
+          )
+        )
+      )
+    );
+
+    $output .= theme_item_list(
+      array(
+        'items' => array(
+          l(t('Your account'), 'user/' . $user->uid, array('attributes' => array('title' => t('Edit your account')))),
+          l(t('Sign out'), 'user/logout'),
+        ),
+        'title' => NULL,
+        'type'  => 'ul',
+        'attributes' => array(),
+      )
+    );
   }
 
-  $output = '<div id="user-login-form">'. $output .'</div>';
+  $output = '<div id="user-login-form">' . $output . '</div>';
 
   return $output;
 }
 
-function userloginbar_form_alter(&$form, $form_state, $form_id) {
+function userloginbar_form_alter(&$form, &$form_state, $form_id) {
   global $form_values;
   switch ($form_id) {
     case 'user_login_block':
-      $form['#action'] = '?q=user&'. drupal_get_destination();
+      $form['#action'] = '?q=user&' . drupal_get_destination();
       $form['#method'] = 'post';
       $form['form_id'] = array(
         '#type' => 'hidden',
@@ -87,27 +117,11 @@ function userloginbar_form_alter(&$form, $form_state, $form_id) {
       );
       $items = array();
       if (variable_get('user_register', 1)) {
-        $items[] = l(t('Register'), 'user/register', array('title' => t('Create a new user account.'))) .' | &nbsp;';
+        $items[] = l(t('Register'), 'user/register', array('attributes' => array('title' => t('Create a new user account.'))));
       }
-      $items[] = l(t('Forgot Password?'), 'user/password', array('title' => t('Request new password via e-mail.')));
+      $items[] = l(t('Forgot Password?'), 'user/password', array('attributes' => array('title' => t('Request new password via e-mail.'))));
 
-      $form['links'] = array('#value' => theme('item_list', $items));
+      $form['links'] = array('#value' => filter_xss(theme_item_list(array('items' => array($items), 'title' => NULL, 'type'  => 'ul', 'attributes' => array()))));
       break;
   }
 }
-
-function userloginbar_admin() {
-  $form['text'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Userloginbar Settings'),
-  );
-
-  $form['text']['disable_welcome_box'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Check this box, if you want to disable welcome box when the user logs in!'),
-    '#default_value' => variable_get('disable_welcome_box', FALSE),
-  );
-
-  return system_settings_form($form);
-}
-
