diff --git a/jquerymenu.admin.inc b/jquerymenu.admin.inc
index d2442dc..ca74e21 100644
--- a/jquerymenu.admin.inc
+++ b/jquerymenu.admin.inc
@@ -18,7 +18,14 @@ function jquerymenu_admin_settings() {
   foreach ($result as $menu) {
     $menulist[$menu->menu_name] = $menu->title;
   }
-
+  
+  // List add Menu block menus
+  // List all custom menus - $menulist
+  $result = db_query("SELECT bid, delta, module, title FROM {block} WHERE module = :menu_block", array(':menu_block' => 'menu_block'));
+  foreach ($result as $menu) {
+    $config = menu_block_get_config($menu->delta);
+    $menulist[$config['menu_name'] . '|' . $menu->delta] = 'Menu Block : ' . $config['admin_title'];
+  }
   // get a list of all jquerymenus - $enabledmenus
   $result = db_query("SELECT menu_name FROM {jquerymenus}");
   $enabledmenus = array();  
diff --git a/jquerymenu.admin.inc_old b/jquerymenu.admin.inc_old
deleted file mode 100644
index 6b7da59..0000000
--- a/jquerymenu.admin.inc_old
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-
-/**
- * @file
- * Administration page callbacks for the jQuerymenu module
- */
-
-/**
- * Admin form for jQuery menu module.
- *
- * @ingroup forms
- * @see system_settings_form()
- */
-function jquerymenu_admin_settings() {
-
-  // List all custom menus - $menulist
-  $result = db_query("SELECT menu_name, title FROM {menu_custom}");
-  $menulist = array();
-  foreach ($result as $menu) {
-    $menulist[$menu->menu_name] = $menu->title;
-  }
-
-  // get a list of all jquerymenus - $enabledmenus
-  $result = db_query("SELECT menu_name FROM {jquerymenus}");
-  $enabledmenus = array();  
-  foreach ($result as $enabled) {
-    $enabledmenus[] = $enabled->menu_name;
-  }
-
-  // find which items in $menulist are in $enabledmenus - $defaultvalue
-  $defaultvalue = array();
-  foreach ($menulist as $index => $value) {
-    foreach ($enabledmenus as $em) {
-      if ($index == $em) {
-        $defaultvalue[] = $index;
-      }
-      else {
-        $defaultvalue[] = 0;
-      }
-    }
-  }
-
-  // Create a list of available menus - jquerymenu_activate.
-  $form['jquerymenu_activate'] = array(
-    '#type' => 'checkboxes',
-    '#title' => t('jQuery Menu blocks'),
-    '#options' => $menulist,
-    '#default_value' => $defaultvalue,
-    '#multiple' => TRUE,
-    '#description' => t('Choose which menus you wish to create a jQuery Menu version for. Please note that this only creates the block. You will still have to activate the block on the blocks page.'),
-  );
-
-  // Create a checkbox to disable animation - jquerymenu_animate.
-  $form['jquerymenu_animate'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Disable animation.'),
-    '#description' => t('If checked your menus will open without any transition effects.'),
-    '#default_value' => variable_get('jquerymenu_animate', 1),
-  );
-
-  // Create a checkbox tp display an edit link - jquerymenu_edit_link.
-  $form['jquerymenu_edit_link'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Display Edit Link.'),
-    '#description' => t('If checked the edit link will display when hovering over menu items to those having administration privileges. This setting will only affect menus directly created by the jQuery Menu module. Other modules that implement the edit link will have their own settings.'),
-    '#default_value' => variable_get('jquerymenu_edit_link', 1),
-  );
-
-  // Create a submit button.
-  $form['jquerymenu_admin_settings_submit'] = array(
-    '#type' => 'submit',
-    '#value' => t('Save'),
-  );
-
-  return $form;
-}
-
-/**
- * Handle submission of jquerymenu_admin_settings_form, save to module variables and table..
- */
-function jquerymenu_admin_settings_submit($form, &$form_state) {
-
-  // Save animation and edit link toggles.
-  variable_set('jquerymenu_animate', $form_state['values']['jquerymenu_animate']);
-  variable_set('jquerymenu_edit_link', $form_state['values']['jquerymenu_edit_link']);
-
-  // Save selected menus.
-  $choices = $form_state['values']['jquerymenu_activate'];
-  // get list of currently enabled menus
-  $result = db_query("SELECT menu_name FROM {jquerymenus}");
-  $enabledmenus = array();
-  foreach ($result as $enabled) {
-    $enabledmenus[] = $enabled->menu_name;
-  }
-
-  // Loop through all menu choices.
-  foreach ($choices as $menuname => $value) {
- 
-    // if value is not 0 and the menu is not already enabled, save it to the database
-    // ??? should it insert it into the block table too?
-    if ($value != '0' && !in_array($value, $enabledmenus)) {
-      $data = array(
-        'menu_name' => $value,
-      );
-      drupal_write_record('jquerymenus', $data);
-    }
-
-    // if the value is 0 remove any records from the database - both block and jquerymenu
-    elseif ($value == '0') {
-      $delta = db_query("SELECT mid FROM {jquerymenus} WHERE menu_name = :name", array(':name' => $menuname))->fetchField();
-      $delta = $delta - 1;
-
-      db_delete('jquerymenus')
-        ->condition('menu_name', $menuname)
-        ->execute();
-      db_delete('block')
-        ->condition('module', 'jquerymenu')
-        ->condition('delta', $delta)
-        ->execute();
-    }
-  }
-
-  // Success message.
-  drupal_set_message(t('Your settings have been saved.'), $type = 'status', $repeat = FALSE);
-}
diff --git a/jquerymenu.module b/jquerymenu.module
index 9bdd890..dee884c 100644
--- a/jquerymenu.module
+++ b/jquerymenu.module
@@ -79,20 +79,27 @@ function jquerymenu_block_info() {
 
   // loop through each jquerymenu
   foreach ($enabledmenus as $mid => $name) {
-    // get the title of the menu
-    //$title = db_query("SELECT title FROM {menu_custom} WHERE menu_name = :name", array(':name'=> $name))->fetchCol('title');
-    $title = db_query("SELECT title FROM {menu_custom} WHERE menu_name = :name", array(':name' => $name))->fetchField();
-
-    // If menu has no title, delete it.
-    if (empty($title)) {
-      db_delete('jquerymenus')
-        ->condition('menu_name', $name)
-        ->execute();
-
-      db_delete('block')
-        ->condition('module', 'jquerymenu')
-        ->condition('delta', $mid)
-        ->execute();
+    //get the menu block details
+    $details = explode('|', $name);
+    if(count($details) > 1){
+      $config = menu_block_get_config($details[1]);
+      $title = 'Menu Block : ' . $config['admin_title'];
+    }
+    else {
+      // get the title of the menu
+      $title = db_query("SELECT title FROM {menu_custom} WHERE menu_name = :name", array(':name' => $name))->fetchField();
+
+      // If menu has no title, delete it.
+      if (empty($title)) {
+        db_delete('jquerymenus')
+          ->condition('menu_name', $name)
+          ->execute();
+
+        db_delete('block')
+          ->condition('module', 'jquerymenu')
+          ->condition('delta', $mid)
+          ->execute();
+      } 
     }
 
     // Create a block.
@@ -129,22 +136,32 @@ function jquerymenu_block_view($delta = '') {
 
   // loop through all jquerymenus
   foreach ($enabledmenus as $mid => $menuname) {
+    //get the menu block details
+    $details = explode('|', $menuname);
+    if(count($details) > 1){
+      $config = menu_block_get_config($details[1]);
+      $menutree = menu_tree_block_data($config);
+      $subject = menu_block_get_title($config['title_link']);
+      $title = render($subject);
+    }
+    else {
+      // gets the data structure representing a named menu tree
+      $menutree = menu_tree_all_data($menuname);
+      if ($menuname == 'navigation' && !empty($user->uid)) {
+        // D6 to D7 conversion: ?? use the associative array or not?
+        $title = theme('username', (array)$user);
+        //$title = theme('username', array('user' => $user));
+      }
+      else {
+        $title = db_query("SELECT title FROM {menu_custom} WHERE menu_name = :name", array(':name' => $menuname))->fetchField();          
+      }
+    }
 
-    // gets the data structure representing a named menu tree
-    $menutree = menu_tree_all_data($menuname);
     if (module_exists('i18n_menu')) {
       $menutree = i18n_menu_localize_tree($menutree, $language->language);
     }
     if (!empty($menutree)) {
       if ($delta == $mid) {
-        if ($menuname == 'navigation' && !empty($user->uid)) {
-          // D6 to D7 conversion: ?? use the associative array or not?
-          $title = theme('username', (array)$user);
-          //$title = theme('username', array('user' => $user));
-        }
-        else {
-          $title = db_query("SELECT title FROM {menu_custom} WHERE menu_name = :name", array(':name' => $menuname))->fetchField();          
-        }
         menu_set_active_menu_names($menuname);
         // get the path to root menu root
         $trail = jquerymenu_trail_creator();
diff --git a/jquerymenu.module_old b/jquerymenu.module_old
deleted file mode 100644
index aea85f4..0000000
--- a/jquerymenu.module_old
+++ /dev/null
@@ -1,471 +0,0 @@
-<?php
-/**
- * @file
- * The jQuerymenu module parses hierarchical link arrays and renders them as click and expand menu blocks.
- */
-
-/**
- * Implements of hook_init().
- */
-function jquerymenu_init() {
-  drupal_add_css(drupal_get_path('module', 'jquerymenu') . '/jquerymenu.css');
-
-  if (!variable_get('jquerymenu_animate', 0)) {
-    drupal_add_js(drupal_get_path('module', 'jquerymenu') . '/jquerymenu.js');
-  }
-  else {
-    drupal_add_js(drupal_get_path('module', 'jquerymenu') . '/jquerymenu_no_animation.js');
-  }
-}
-
-
-/**
- * Implements hook_permission
- */
-function jquerymenu_permission() {
-  return array(
-    'administer jquerymenu' => array(
-      'title' => t('Administer jQuery Menu'), 
-      'description' => t('Perform administration tasks for my jQuery Menu.'),
-    ),
-  );
-}
-
-/**
- * Implements hook_menu().
- */
-function jquerymenu_menu() {
-  $items = array();
-
-  // Create the admin form link.
-  $items['admin/config/user-interface/jquerymenu/settings'] = array(
-    'title' => 'jQuery Menu Settings',
-    'description' => 'Set the options for the jQuery Menu Module',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('jquerymenu_admin_settings'),    
-    'access arguments' => array('administer jquerymenu'),
-    'type' => MENU_NORMAL_ITEM,
-    'file' => 'jquerymenu.admin.inc',
-  );
-
-  return $items;
-}
-
-/**
- * Implements hook_block_info().
- */
-function jquerymenu_block_info() {
-  // create array to hold blocks
-  $blocks = array();
-
-  // get a list of enabled jquerymenus
-  $result = db_query("SELECT mid, menu_name FROM {jquerymenus}");
-  $enabledmenus = array();
-  foreach ($result as $enabled) {
-    $enabledmenus[$enabled->mid] = $enabled->menu_name;
-  }
-
-  // loop through each jquerymenu
-  foreach ($enabledmenus as $mid => $name) {
-    // get the title of the menu
-    //$title = db_query("SELECT title FROM {menu_custom} WHERE menu_name = :name", array(':name'=> $name))->fetchCol('title');
-    $title = db_query("SELECT title FROM {menu_custom} WHERE menu_name = :name", array(':name' => $name))->fetchField();
-
-    // If menu has no title, delete it.
-    if (empty($title)) {
-      db_delete('jquerymenus')
-        ->condition('menu_name', $name)
-        ->execute();
-
-      db_delete('block')
-        ->condition('module', 'jquerymenu')
-        ->condition('delta', $mid)
-        ->execute();
-    }
-
-    // Create a block.
-    $blocks[$mid] = array(
-      'info' => t($title . ' - jQuery Menu'),
-      'status' => TRUE,
-      'region' => 'sidebar_first',
-      'weight' => 0,
-      'visibility' => 'BLOCK_VISIBILITY_NOTLISTED',
-      'cache' => 'DRUPAL_NO_CACHE'
-    );
-  }
-
-  return $blocks;
-}
-
-/**
- * Implements hook_block_view().
- */
-function jquerymenu_block_view($delta = '') {
-  global $user;
-
-  $block = array();
-  // List of enabled jquerymenus.
-  $result = db_query("SELECT mid, menu_name FROM {jquerymenus}");
-  $enabledmenus = array();
-
-  foreach ($result as $enabled) {
-    $enabledmenus[$enabled->mid] = $enabled->menu_name;
-  }
-
-  // create variable to hold current active menu
-  $old_activemenu = menu_get_active_menu_names();
-
-  // loop through all jquerymenus
-  foreach ($enabledmenus as $mid => $menuname) {
-
-    // gets the data structure representing a named menu tree
-    $menutree = menu_tree_all_data($menuname);
-    if (!empty($menutree)) {
-      if ($delta == $mid) {
-        if ($menuname == 'navigation' && !empty($user->uid)) {
-          // D6 to D7 conversion: ?? use the associative array or not?
-          $title = theme('username', (array)$user);
-          //$title = theme('username', array('user' => $user));
-        }
-        else {
-          $title = db_query("SELECT title FROM {menu_custom} WHERE menu_name = :name", array(':name' => $menuname))->fetchField();          
-        }
-        menu_set_active_menu_names($menuname);
-        // get the path to root menu root
-        $trail = jquerymenu_trail_creator();
-        $block['subject'] = t($title);
-        // create the block content
-        $block['content'] = theme('jquerymenu_menu', array('tree' => $menutree, 'trail' => $trail));
-      }
-    }
-  }
-  // return active menu to what it was originally
-  menu_set_active_menu_names($old_activemenu);
-
-  return $block;
-}
-
-function jquerymenu_trail_creator() {
-  $activetrail = menu_get_active_trail();
-  $url_array = array();
-  foreach ($activetrail as $trail) {
-    // Create an array of only the paths for easy evaluation.
-    if (isset($trail['href'])) {
-      $url_array[] = $trail['href'];
-    }
-  }
-  return $url_array;
-}
-
-function recursive_link_creator($items = array(), $trail, $parentid = '') {
-  static $menucount = 0;
-
-  $count = 0;
-  $output = '';
-  $nextlevel = '';
-
-  if (!isset($edit_access)) {
-    $edit_access = 'administer menu'; //http://drupal.org/node/911726
-  }
-
-  if ($parentid == '') {
-    $menucount++;
-    $parentid = $menucount;
-  }
-
-  $url_array = $trail;
-  
-  global $active;
-  /*foreach ($items as $item) {
-    if(in_array($item['link']['href'], $url_array)) {
-        for($i=1; $i<10; $i++) {
-            if($item['link']['p'.$i] != 0) { //if item is active tail, get a list of it's parents.
-                $active  .= ' ' . $item['link']['p' . $i];
-            }
-          }
-      }
-  }*/
-	
-  $i = 0;
-  if (!empty($items)) {
-    foreach ($items as $item) {
-      $count++;
-      $id = $parentid . '-' . $count;
-      $classes = array();
-      $state = 'closed';
-      // If there are submenu items we assign the parent a class.
-      if (!empty($item['link']['has_children'])) {
-        $nextlevel = '';
-        $nextlevel = recursive_link_creator($item['below'], $url_array, $id);
-        if (!empty($nextlevel)) {
-          $classes[] = 'parent';
-        }
-      }
-
-      // If the menu item is expanded or in the active trail and if has children add the "open" class.
-			if (
-			  (!empty($item['link']['mlid']) && in_array($item['link']['mlid'], $url_array)) || 
-				($item['link']['expanded'] != 1) || 
-				((in_array($item['link']['href'], $url_array) || ($_GET['q'] == $item['link']['href'])) && !empty($item['link']['has_children']) && !empty($nextlevel))
-				) {
-			  $classes[] = 'open';
-        $state = 'open';
-      }
-      elseif (!empty($item['below']) && !empty($nextlevel)) {
-        $classes[] = 'closed';
-      }
-
-      if (in_array($item['link']['href'], $url_array)) {
-        $classes[] = 'active-trail';
-      }
-
-      if ($_GET['q'] == $item['link']['href'] || ($item['link']['href'] == '<front>' && $_GET['q'] == variable_get('site_frontpage', 'node'))) {
-        $classes[] = 'active';
-      }
-
-      if ($count == 1) {
-        $classes[] = 'first';
-      }
-      if ($count == count($items)) {
-        $classes[] = 'last';
-      }
-
-      $options = array();
-      if (isset($item['link']['options'])) {
-        $options = $item['link']['options'];
-      }
-
-      if (variable_get('jquerymenu_edit_link', 1) == 1) {
-        if (empty($item['link']['edit_path'] )) {
-          if (!empty($item['link']['mlid'])) {
-            $edit_path = 'admin/build/menu/item/' . $item['link']['mlid'] . '/edit';
-          }
-        }
-        else {
-          $edit_path = $item['link']['edit_path'];
-        }
-      }
-      else {
-        $edit_path = '';
-      }
-
-      if (empty($item['link']['edit_access'])) {
-        $edit_access = 'administer menu';
-      }
-      else {
-        $edit_access = $item['link']['edit_access'];
-      }
-
-      if (empty($item['link']['edit_text'])) {
-        $edit_text = t('Edit this link');
-      }
-      else {
-        $edit_text = $item['link']['edit_text'];
-      }
-
-      if (!empty($item['link']['to_arg_functions'])) {
-        $toarg_array = array();
-        $patharray = explode('/', $item['link']['href']);
-        foreach ($patharray as $chunk) {
-          if ($chunk != '%') {
-            $toarg_array[] = $chunk;
-          }
-          else {
-            $function = $item['link']['to_arg_functions'];
-            $function = explode('"', $function);
-            $function = $function[1];
-            $toarg_array[] = $function('%');
-          }
-        }
-        $path = implode('/', $toarg_array);
-      }
-      else {
-        $path = $item['link']['href'];
-      }
-
-      if ($item['link']['hidden'] == 1 && !empty($item['link']['has_children'])) {
-        $output .= recursive_link_creator($item['below'], $url_array, $id);
-      }
-
-      if ($item['link']['hidden'] != 1 && $item['link']['hidden'] != -1) {
-        $output .= theme('jquerymenu_listitem', array(
-          'item' => $item,
-          'title' => $item['link']['title'],
-          'path' => $path,
-          'options' => $options,
-          'state' => $state,
-          'classes' => $classes,
-          'has_children' => $item['link']['has_children'],
-          'edit_path' => $edit_path,
-          'edit_text' => $edit_text,
-          'edit_access' => $edit_access,
-          'nextlevel' => $nextlevel,
-        ));
-      }
-    }
-  }
-  return $output;
-}
-
-/**
- * Implements hook_theme().
- */
-function jquerymenu_theme() {
-  return array(
-    'jquerymenu_menu' => array(
-      'variables' => array(
-        'tree' => NULL,
-        'trail' => NULL,
-      ),
-    ),
-
-    'jquerymenu_listitem' => array(
-      'variables' => array(
-        'item' => NULL,
-
-        'title' => NULL,
-        'path' => NULL,
-        'options' => NULL,
-        'state' => NULL,
-        'classes' => NULL,
-        'has_children' => NULL,
-        'edit_path' => NULL,
-        'edit_text' => NULL,
-        'edit_access' => NULL,
-        'nextlevel' => NULL,
-      ),
-    ),
-  
-    'jquerymenu_links' => array(
-      'variables' => array(
-        'title' => NULL,
-        'path' => NULL,
-        'options' => NULL,
-        'state' => NULL,
-        'classes' => NULL,
-        'has_children' => NULL,
-        'edit_path' => NULL,
-        'edit_text' => NULL,
-        'edit_access' => NULL,
-      ),
-    ),
-  );
-}
-
-function theme_jquerymenu_menu($variables) {
-  $tree = $variables['tree'];
-  $trail = $variables['trail'];
-  $menu_output = recursive_link_creator($tree, $trail);
-  if (!empty($menu_output)) {
-    // We create the shell to hold the menu outside the recursive function.
-    // Add a div that only shows up for that pesky IE so that we can style it into obedience.
-    $output  = '<!--[if IE]><div class="ie"><![endif]-->';
-    $output .= '<ul class="menu jquerymenu">';
-    $output .= $menu_output;
-    $output .= '</ul>';
-    $output .= '<!--[if IE]></div><![endif]-->';
-    return $output;
-  }
-}
-
-/**
- * Render a list item containing one or more links.
- */
-function theme_jquerymenu_listitem($variables) {
-  $item         = $variables['item'];
-  $title        = $variables['title'];
-  $path         = $variables['path'];
-  $options      = $variables['options'];
-  $state        = $variables['state'];
-  $classes      = $variables['classes'];
-  $nextlevel    = $variables['nextlevel'];
-  $has_children = $variables["has_children"];
-  $edit_path    = $variables["edit_path"];
-  $edit_text    = $variables["edit_text"];
-  $edit_access  = $variables["edit_access"];
-  
-  if (!isset($output)) {
-    $output = '';
-  }
-
-  $output .= '<li ' . (variable_get('jquerymenu_insert_list_item_id', 0) ? 'id="jquerymenu-' . $id . '" ' : '') . (empty($classes) ? '>' : ' class="' . implode(' ', $classes) . '">');
-
-  $output .= theme('jquerymenu_links', array(
-    'title' => $item['link']['title'],
-    'path' => $path,
-    'options' => $options,
-    'state' => $state,
-    'classes' => $classes,
-    'has_children' => $item['link']['has_children'],
-    'edit_path' => $edit_path,
-    'edit_text' => $edit_text,
-    'edit_access' => $edit_access,
-  ));
-
-  if (!empty($item['link']['has_children'])) {
-    if (!empty($nextlevel)) {
-      $output .= '<ul>';
-      // If the link has children call the function on itself.
-      $output .= $nextlevel;
-      $output .= '</ul>';
-    }
-  }
-
-  $output .= '</li>';
-  return $output;
-}
-
-/**
- * Render a single link, possibly with open/close link and/or edit button.
- */
-function theme_jquerymenu_links($variables) {
-  // create values from the parameter array
-  $title        = $variables["title"];
-  $path         = $variables["path"];
-  $options      = $variables["options"];
-  $state        = $variables["state"];
-  $classes      = $variables["classes"];
-  $has_children = $variables["has_children"];
-  $edit_path    = $variables["edit_path"];
-  $edit_text    = $variables["edit_text"];
-  $edit_access  = $variables["edit_access"];
-
-  $output = '';
-  // This is the span that becomes the little plus and minus symbol.
-  $plus = '<span' . (empty($classes) ? '>' : ' class="' . implode(' ', $classes) . '">') . '</span>';
-  if ($edit_path != NULL && user_access($edit_access)) {
-    $edit_box = jquerymenu_edit_box($edit_path, $edit_text);
-    if ($has_children != 0) {
-      $output .= $edit_box . $plus . l($title, $path, $options);
-    }
-    else {
-      $output .= $edit_box . l($title, $path, $options);
-    }
-  }
-  else {
-    if ($has_children != 0) {
-      $output .= $plus . l($title, $path, $options);
-    }
-    else {
-      $output .= l($title, $path, $options);
-    }
-  }
-  return $output;
-}
-
-/**
- * Render edit link for a menu item.
- */
-function jquerymenu_edit_box($edit_path, $edit_title = NULL) {
-  $options['html'] = TRUE;
-  if (!empty($edit_title)) {
-    $options['attributes']['title'] = $edit_title;
-  }
-  else {
-    $options['attributes']['title'] = t('Edit');
-  }
-  $path = base_path() . drupal_get_path('module', 'jquerymenu');
-  $editimage = '<img src="' . $path . '/images/edit.png" alt="edit menu" />';
-  return '<span class="jquerymenu_link_edit">' . l($editimage, $edit_path, $options) . '</span>';
-}
-
