diff -Nurp ../homebox.orig/homebox.admin.inc ./homebox.admin.inc
--- ../homebox.orig/homebox.admin.inc	2011-01-07 13:34:18.000000000 -0600
+++ ./homebox.admin.inc	2011-01-07 15:59:34.000000000 -0600
@@ -8,10 +8,7 @@
  * Defines homebox pages, default layout, settings
  */
 
-function homebox_admin_page($form, &$form_state) {
-  // Already validated
-  $page = homebox_get_page(arg(4));
-
+function homebox_admin_page($form, &$form_state, $page = FALSE) {
   if ($page) {
     drupal_set_title(t('Edit !title', array('!title' => $page->settings['title'])));
   }
@@ -96,7 +93,7 @@ function homebox_admin_page($form, &$for
     '#default_value' => $page ? $page->settings['custom'] : 0,
   );
 
-  $result = db_query('SELECT rid, name FROM {role} ORDER BY name');
+  $result = db_query('SELECT rid, name FROM {role} ORDER BY name')->fetchAll();
   $role_options = array();
   foreach ($result as $role) {
     $role_options[$role->name] = $role->name;
@@ -472,9 +469,13 @@ function homebox_admin_display_form($for
     );
 
     // Get default region/column for block
-    $column = $page->settings['blocks'][$key]['region'];
-    // If not set assign to <none>
-    $column = ($column != 0) ? $column : HOMEBOX_REGION_NONE;
+    if (isset($page->settings['blocks'][$key]['region'])){
+      $column = $page->settings['blocks'][$key]['region'];
+    }
+    else {
+      // If not set assign to <none>
+      $column = HOMEBOX_REGION_NONE;
+    }
 
     $form[$key]['region'] = array(
       '#type' => 'select',
@@ -624,8 +625,13 @@ function template_preprocess_homebox_adm
   drupal_add_css($path = drupal_get_path('module', 'homebox') . '/homebox.css', array('type' => $type = 'module', 'media' => $media = 'all', 'preprocess' => $preprocess = TRUE));
 
   // Load page
-  $page = homebox_get_page($variables['form']['name']['#value']);
-  $block_regions = homebox_named_columns($page->settings['regions']);
+  if (isset($variables['form']['name']['#value'])){
+    $page = homebox_get_page($variables['form']['name']['#value']);
+    $block_regions = homebox_named_columns($page->settings['regions']);
+  }
+  else {
+    $block_regions = homebox_named_columns(0);
+  }
   $variables['block_regions'] = $block_regions + array(HOMEBOX_REGION_NONE => t('Disabled'));
   foreach ($block_regions as $key => $value) {
     // Initialize an empty array for the region.
@@ -724,7 +730,7 @@ function homebox_configure_form($form, &
     $form['widths']['width_' . $i] = array(
       '#type' => 'textfield',
       '#title' => t('Column #!number width', array('!number' => $i)),
-      '#default_value' => $page->settings['widths'][$i] ? $page->settings['widths'][$i] : '',
+      '#default_value' => array_key_exists($i, $page->settings['widths']) ? $page->settings['widths'][$i] : '',
       '#size' => 10,
       '#field_suffix' => '%',
     );
@@ -769,7 +775,7 @@ function homebox_configure_form($form, &
         '#type' => 'textfield',
         '#title' => t('Color #!number', array('!number' => $i)),
         '#description' => t('Enter an hexadecimal value, ex: #ff33dd'),
-        '#default_value' => $page->settings['colors'][$i] ? $page->settings['colors'][$i] : '#E4F0F8',
+        '#default_value' => array_key_exists($i, $page->settings['colors']) ? $page->settings['colors'][$i] : '#E4F0F8',
         '#size' => 7,
         '#maxlength' => 7,
       );
diff -Nurp ../homebox.orig/homebox.module ./homebox.module
--- ../homebox.orig/homebox.module	2011-01-07 13:34:18.000000000 -0600
+++ ./homebox.module	2011-01-07 15:27:04.000000000 -0600
@@ -93,6 +93,7 @@ function homebox_menu() {
   );
   $items['admin/structure/homebox/edit/%homebox'] = array(
     'title' => 'Edit page',
+    'page callback' => 'drupal_get_form',
     'page arguments' => array('homebox_admin_page', 4),
     'access arguments' => array('administer homebox'),
     'type' => MENU_CALLBACK,
@@ -158,13 +159,23 @@ function homebox_menu() {
  * Implements hook_load().
  */
 function homebox_load($names) {
-  dsm($names);
-  foreach ($names as $nid => $name) {
-    $page = homebox_get_page($name);
-    foreach ($page ? $page : FALSE as $property => $value) {
-      $name->$property = $value;
+  if (module_exists('devel')){
+    dsm($names);
+  }
+
+  if (is_array($names)){
+    $loaded_names = array();
+
+    foreach ($names as $nid => $name) {
+      $loaded_name = homebox_get_page($name);
+
+      if ($loaded_name) $loaded_names[$nid] = $name;
     }
+
+    return $loaded_names;
   }
+  
+  return homebox_get_page($names);
 }
 
 /**
@@ -183,17 +194,16 @@ function homebox_help($path, $arg) {
     case 'admin/structure/homebox':
       $output = '<p>' . theme('advanced_help_topic', array('module' => 'homebox', 'topic' => 'introduction')) . '&nbsp;';
       $output .= t("Homebox pages are listed below. Each page is accessible from a single url on your site that you specify during page creation. You can create as many pages as you need. Be sure to review all available layout options and settings.</p>");
-      break;
+      return $output;
     case 'admin/structure/homebox/layout/%':
       $output = '<p>' . theme('advanced_help_topic', array('module' => 'homebox', 'topic' => 'default-layout')) . '&nbsp;';
       $output .= t("This page behave the same way as Drupal block administration page. Drag blocks to whatever column you want to enable it for your users. Note that you can change the number of columns in the <a href='!settings_url'>settings page</a>", array('!settings_url' => url('admin/structure/homebox/settings/' . arg(4)))) . '.</p>';
-      break;
+      return $output;
     case 'admin/structure/homebox/settings/%':
       $output = '<p>' . theme('advanced_help_topic', array('module' => 'homebox', 'topic' => 'settings')) . '&nbsp;';
       $output .= t('Homebox configuration page.');
-      break;
+      return $output;
   }
-  return $output ? $output : NULL;
 }
 
 /**
@@ -473,7 +483,7 @@ function _homebox_can_view_block($block,
   }
 
   // Check for roles set at the block level
-  $allowed_roles = db_query("SELECT rid FROM {block_role} WHERE module = :module AND delta = :delta", array(':module' => $block->module, ':delta' => $block->delta));
+  $allowed_roles = db_query("SELECT rid FROM {block_role} WHERE module = :module AND delta = :delta", array(':module' => $block->module, ':delta' => $block->delta))->fetchAll();
 
   // Indicate whether or not role restrictions were set on the block
   $role_set = FALSE;
@@ -628,9 +638,9 @@ function homebox_list_available_blocks($
  */
 function homebox_get_page($name) {
   // Fetch page from db
-  $page = db_query("SELECT * FROM {homebox_pages} WHERE name = :name", array(':name' => $name))->fetchField();
+  $page = db_query("SELECT * FROM {homebox_pages} WHERE name = :name", array(':name' => $name))->fetchObject();
 
-  if ($page) {
+  if (is_object($page)) {
     // Unserialize the settings
     $page->settings = unserialize($page->settings);
     return $page;
@@ -638,6 +648,7 @@ function homebox_get_page($name) {
   else {
     // If not available, check other modules
     $pages = module_invoke_all('homebox');
+
     foreach ($pages as $id => $data) {
       // Only match page name
       if ($name == $id) {
@@ -651,7 +662,7 @@ function homebox_get_page($name) {
       }
     }
 
-    return $page ? $page : FALSE;
+    return is_object($page) ? $page : FALSE;
   }
 }
 
@@ -772,7 +783,8 @@ function homebox_check_path($path, $name
   }
 
   // Check path against existing Homebox paths
-  $pages = db_query("SELECT * FROM {homebox_pages}");
+  $pages = db_query("SELECT * FROM {homebox_pages}")->fetchAll();
+
   foreach ($pages as $page) {
     $page->settings = unserialize($page->settings);
     // If this is the page we're checking, skip it
@@ -1238,7 +1250,7 @@ function homebox_pages($api = TRUE) {
   $pages = array();
 
   // Fetch all available pages from database
-  $result = db_query("SELECT * FROM {homebox_pages} ORDER BY name");
+  $result = db_query("SELECT * FROM {homebox_pages} ORDER BY name")->fetchAll();
 
   foreach ($result as $page) {
     $page->settings = unserialize($page->settings);
@@ -1460,15 +1472,6 @@ function homebox_requirements($phase) {
         );
       }
 
-      if (jquery_ui_get_version() != HOMEBOX_JQUERY_UI_VERSION) {
-        $requirements['homebox_jquery'] = array(
-          'title' => t('Homebox 2'),
-          'value' => jquery_ui_get_version(),
-          'description' => t('Homebox 2 is designed to run with jQuery UI 1.6.'),
-          'severity' => REQUIREMENT_WARNING,
-        );
-      }
-
     case 'install':
       $requirements['homebox_php'] = array(
         'title' => t('Homebox 2'),
