diff --git a/README.txt b/README.txt
index ec28b93..5ea1427 100644
--- a/README.txt
+++ b/README.txt
@@ -15,5 +15,6 @@ can be found on the Aegir website and the community portal:
    http://community.aegirproject.org
 
 To install the complete Aegir system, you first need to install Drush
-and Provision. See the install instructions provided in the Provision
-module.
+and Provision, see the install manual on the community site:
+
+   http://community.aegirproject.org/installing
diff --git a/hostmaster.make b/hostmaster.make
index 83ddb83..ae18cf2 100644
--- a/hostmaster.make
+++ b/hostmaster.make
@@ -5,12 +5,14 @@ api = 2
 projects[admin_menu][version] = "1.8"
 projects[openidadmin][version] = "1.2"
 projects[install_profile_api][version] = "2.1"
-projects[jquery_ui][version] = "1.3"
+projects[jquery_ui][version] = "1.4"
 projects[modalframe][version] = "1.6"
 
+; These are contrib modules, but come under the Aegir 'umbrella' of control.
+projects[hosting_platform_pathauto][version] = "2.0-beta1"
+
 ; Libraries
 libraries[jquery_ui][download][type] = "get"
 libraries[jquery_ui][destination] = "modules/jquery_ui"
 libraries[jquery_ui][download][url] = "http://jquery-ui.googlecode.com/files/jquery.ui-1.6.zip"
 libraries[jquery_ui][directory_name] = "jquery.ui"
-
diff --git a/hostmaster.profile b/hostmaster.profile
index f7a7ecb..b52f165 100644
--- a/hostmaster.profile
+++ b/hostmaster.profile
@@ -12,6 +12,8 @@ function hostmaster_profile_modules() {
     /* core */ 'block', 'color', 'filter', 'help', 'menu', 'node', 'system', 'user',
     /* aegir contrib */ 'hosting', 'hosting_task', 'hosting_client', 'hosting_db_server', 'hosting_package', 'hosting_platform', 'hosting_site', 'hosting_web_server', 'hosting_server', 'hosting_clone', 'hosting_cron', 'hosting_migrate',
     /* other contrib */ 'install_profile_api' /* needs >= 2.1 */, 'jquery_ui', 'modalframe', 'admin_menu',
+    /* Aegir actual contrib */
+    'hosting_platform_pathauto',
   );
 }
 
diff --git a/modules/hosting/alias/hosting_alias.module b/modules/hosting/alias/hosting_alias.module
index f67c740..599fd40 100644
--- a/modules/hosting/alias/hosting_alias.module
+++ b/modules/hosting/alias/hosting_alias.module
@@ -349,26 +349,3 @@ function hosting_alias_allow_domain($url, $params = array()) {
   return $result;
 
 }
-
-/**
- * Count the number of sites using a particular URL.
- *
- * @deprecated This is essentially !hosting_alias_allow_domain().
- */
-function hosting_alias_count_sites($url, $params = array()) {
-  $query = "SELECT COUNT(n.nid) FROM {node} n 
-      LEFT JOIN {hosting_site} h ON h.nid=n.nid 
-      LEFT JOIN {hosting_site_alias} a  ON n.vid = a.vid 
-    WHERE 
-      type='site' AND alias='%s' AND h.status <> %d";
-
-  $args[] = $url;
-  $args[] = HOSTING_SITE_DELETED;
-
-  if (isset($params['nid'])) {
-    $query .= ' AND n.nid <> %d';
-    $args[] = $params['nid'];
-  }
-
-  return db_result(db_query($query, $args));
-}
diff --git a/modules/hosting/client/hosting_client.install b/modules/hosting/client/hosting_client.install
index 78aea9f..fb951cc 100644
--- a/modules/hosting/client/hosting_client.install
+++ b/modules/hosting/client/hosting_client.install
@@ -297,3 +297,26 @@ function hosting_client_update_6002() {
   $ret[0]['success'] = TRUE; // never fail
   return $ret;
 }
+
+/**
+ * Remove duplicate client nodes.
+ *
+ * Those may have been created in development versions of 2.x code, see
+ * https://drupal.org/node/1146014
+ */
+function hosting_client_update_6003() {
+  $q = db_query("SELECT n.nid FROM {node} n LEFT JOIN {hosting_client} hc ON n.nid = hc.nid WHERE n.type = 'client' AND hc.nid IS NULL;");
+  while ($nid = db_result($q)) {
+    node_delete($nid);
+  }
+  return array(); // never fail
+}
+
+/**
+ * Make all sites with client relationship lost owned by the default client.
+ */
+function hosting_client_update_6004() {
+  $ret = array();
+  $ret[] = update_sql("UPDATE {hosting_site} SET client = %d WHERE client = 0", HOSTING_DEFAULT_CLIENT);
+  return $ret;
+}
diff --git a/modules/hosting/client/hosting_client.module b/modules/hosting/client/hosting_client.module
index 09fd9ee..6c47869 100644
--- a/modules/hosting/client/hosting_client.module
+++ b/modules/hosting/client/hosting_client.module
@@ -132,29 +132,6 @@ function hosting_get_client_by_uname($uname) {
 }
 
 /**
- * Get a client by email
- *
- * This is really a shortcut to node_load()
- *
- * @see node_load()
- * @see hosting_get_client()
- * @deprecated the email field and therefore this function will be
- *   completely dropped in 2.x. this may not even work at all as the
- *   email field will not be populated on new sites. use
- *   hosting_get_client() instead
- */
-function hosting_get_client_by_email($email) {
-  $caller = next(debug_backtrace());
-  trigger_error(t("@function() is deprecated and may yield undefined results, replace with @newfunction(), called from @caller in @file", array('@file' => $caller['file'] . ':' . $caller['line'], '@caller' => $caller['function'], '@function' => __FUNCTION__, '@newfunction' => 'hosting_get_client')), E_USER_DEPRECATED);
-
-  $result = db_result(db_query("SELECT c.nid FROM {hosting_client} c INNER JOIN {node} n ON n.nid = c.nid WHERE c.email = '%s'", $email));
-  if ($result) {
-    return node_load($result);
-  }
-  return false;
-}
-
-/**
  * Implementation of hook_form().
  */
 function hosting_client_form(&$node) {
@@ -347,7 +324,7 @@ function _hosting_client_get_role() {
 function hosting_client_register_user($node) {
   $pass = user_password();
   $user = new stdClass();
-  $edit['name'] = $node->email;
+  $edit['name'] = $node->uname;
   $edit['hosting_client'] = $node->nid;
   $edit['mail'] = $node->email;
   $edit['pass'] = $pass;
@@ -410,8 +387,7 @@ function hosting_client_update($node) {
     } else {
       $node->uname = hosting_client_sanitize($node->title);
     }
-    db_query("UPDATE {hosting_client} SET nid=%d, uname='%s' WHERE vid=%d",
-             $node->nid, $node->uname, $node->vid);
+    db_query("UPDATE {hosting_client} SET uname='%s' WHERE nid=%d", $node->uname, $node->nid);
   }
   if ($node->users) {
     foreach ($node->users as $user) {
@@ -550,23 +526,12 @@ function hosting_client_view($node, $teaser = FALSE, $page = FALSE) {
  * Helper function to generate new client node during import.
  *
  * @param $name
- *   Client email address or name.
- * @param $organization
- *   Client name, title, organization or machine name - deprecated.
+ *   Client name.
  * @return
  *   The nid of the generated client.
- * @deprecated the organization and email parameters will be dropped
- *   in 2.x in favor of the name parameter, which will become the
- *   sole argument.
  */
-function hosting_import_client($name, $organization = '') {
+function hosting_import_client($name) {
   $client = hosting_get_client_by_uname($name);
-  if (!$client) {
-    $client = hosting_get_client($name);
-  }
-  if (!$client) {
-    $client = hosting_get_client_by_email($name);
-  }
 
   if (!$client) {
     $client = new stdClass();
diff --git a/modules/hosting/clone/hosting_clone.drush.inc b/modules/hosting/clone/hosting_clone.drush.inc
index 785f358..42f0d1a 100644
--- a/modules/hosting/clone/hosting_clone.drush.inc
+++ b/modules/hosting/clone/hosting_clone.drush.inc
@@ -47,7 +47,7 @@ function hosting_clone_post_hosting_clone_task($task, $data) {
     $clone->verified = 0; # ... and it does verify
     $clone->aliases = isset($task->task_args['aliases']) ? $task->task_args['aliases'] : array();
     $clone->redirection = isset($task->task_args['redirection']) ? $task->task_args['redirection'] : FALSE;
-
+    
     if ($clone->db_server != $task->task_args['new_db_server']) {
       $clone->db_server = $task->task_args['new_db_server'];
     }
diff --git a/modules/hosting/db_server/hosting_db_server.service.inc b/modules/hosting/db_server/hosting_db_server.service.inc
index 0a1b66b..c0a047d 100644
--- a/modules/hosting/db_server/hosting_db_server.service.inc
+++ b/modules/hosting/db_server/hosting_db_server.service.inc
@@ -39,7 +39,7 @@ class hostingService_db_mysql extends hostingService_db {
     }
     $form['db_passwd'] = array(
       '#type' => 'password_confirm',
-      '#required' => ($this->db_passwd) ? FALSE : $this->available,
+      '#required' => FALSE,
       '#description' => $passwd_description . t('The password for the user that will be used to create new mysql users and databases for new sites'),
       '#size' => 30,
       '#weight' => 10
diff --git a/modules/hosting/dispatch.hosting.inc b/modules/hosting/dispatch.hosting.inc
index f4af08e..9d6a9e8 100644
--- a/modules/hosting/dispatch.hosting.inc
+++ b/modules/hosting/dispatch.hosting.inc
@@ -41,7 +41,7 @@ function drush_hosting_dispatch() {
               drush_log(dt("maximum number of tasks (@count) already running", array('@count' => $info['running_items'])));
             } else {
               drush_log(dt("found @running running tasks, starting @count out of @max items", array('@running' => $info['running_items'], '@count' => $count, '@max' => $info['calc_items'])));
-              drush_backend_fork("hosting-" . $queue, array('items' => $count));
+              drush_invoke_process('@self', "hosting-" . $queue, array(), array('items' => $count, 'invoke' => TRUE), array('fork' => TRUE));
             }
           } else {
             drush_log(dt("too early for queue @queue", array('@queue' => $queue)));
diff --git a/modules/hosting/example/hosting_example.service.inc b/modules/hosting/example/hosting_example.service.inc
index 92859e5..b6971c3 100644
--- a/modules/hosting/example/hosting_example.service.inc
+++ b/modules/hosting/example/hosting_example.service.inc
@@ -16,8 +16,8 @@
  */
 class hostingService_example extends hostingService {
  /**
- *   the value stored in the service column of hosting_service table.
- */
+  * the value stored in the service column of hosting_service table.
+  */
   public $service = 'example';
 }
 
@@ -28,30 +28,30 @@ class hostingService_example extends hostingService {
 
 class hostingService_example_basic extends hostingService_example {
  /**
-  *   the value stored in the type column of the hosting_service table.
+  * the value stored in the type column of the hosting_service table.
   */
   public $type = 'basic';
 
 
  /**
-  *   this service needs to have a port specified for it.
+  * this service needs to have a port specified for it.
   */
   public $has_port = TRUE;
 
  /**
-  *   the default value for the port input.
+  * the default value for the port input.
   */
   function default_port() {
     return 12345;
   }
 
  /**
-  *   this service needs to be restarted with a shell command.
+  * this service needs to be restarted with a shell command.
   */
   public $has_restart_cmd = TRUE;
 
  /**
-  *   The default value for the restart command input.
+  * The default value for the restart command input.
   */
   function default_restart_cmd() {
     return "/usr/bin/true";
@@ -60,7 +60,7 @@ class hostingService_example_basic extends hostingService_example {
 
 
  /**
-  *   node operations
+  * node operations
   */
 
   /**
@@ -208,14 +208,12 @@ class hostingService_example_basic extends hostingService_example {
     *
     * @ingroup backend-frontend-IPC
     */
-
-  public function context_options($task_type, $ref_type, &$task) {
-    // REMEMBER TO CALL THE PARENT!
-    parent::context_options($task_type, $ref_type, $task);
-
-    $task->context_options['example_field'] = $this->example_field;
-  }
-
+   public function context_options($task_type, $ref_type, &$task) {
+     // REMEMBER TO CALL THE PARENT!
+     parent::context_options($task_type, $ref_type, $task);
+     
+     $task->context_options['example_field'] = $this->example_field;
+   }
 }
 
 /**
diff --git a/modules/hosting/hosting.api.php b/modules/hosting/hosting.api.php
index 0fc8e0b..74a94ba 100644
--- a/modules/hosting/hosting.api.php
+++ b/modules/hosting/hosting.api.php
@@ -263,7 +263,11 @@ function hook_provision_args($task, $task_type) {
  * Perform actions when a task has completed succesfully.
  *
  * Replace TASK_TYPE with the type of task that if completed you will be
- * notified of.
+ * notified of. This is a good place to hook in and record changes in the
+ * frontend as a result of the task executing in the backend. If you just want
+ * to hook into the backend then you probably want to consider using the
+ * 'standard' Drush hooks there, i.e. host_post_provision_verify(),
+ * hook_post_provision_install() etc.
  *
  * @param $task
  *   The hosting task that has completed.
@@ -301,10 +305,10 @@ function hook_post_hosting_TASK_TYPE_task($task, $data) {
  * module to determine which items it wishes to process.
  *
  * If you wish to process multiple items at the same time you will need to fork
- * the process by calling drush_backend_fork(), specifying a drush command with
- * the arguments required to process your task. Otherwise you can do all your
- * processing in this function, or similarly call drush_backend_invoke(), which
- * won't fork the process.
+ * the process by calling drush_invoke_process() with the 'fork' option,
+ * specifying a drush command with the arguments required to process your task.
+ * Otherwise you can do all your processing in this function, or similarly call
+ * drush_invoke_process() without the 'fork' option.
  *
  * @param $count
  *   The maximum number of items to process.
@@ -319,7 +323,7 @@ function hosting_QUEUE_TYPE_queue($count = 5) {
   drush_log(dt("Running tasks queue"));
   $tasks = _hosting_get_new_tasks($count);
   foreach ($tasks as $task) {
-    drush_backend_fork("hosting-task", array($task->nid));
+    drush_invoke_process('@self', "hosting-task", array($task->nid), array(), array('fork' => TRUE));
   }
 }
 
diff --git a/modules/hosting/hosting.drush.inc b/modules/hosting/hosting.drush.inc
index 242de72..c265e68 100644
--- a/modules/hosting/hosting.drush.inc
+++ b/modules/hosting/hosting.drush.inc
@@ -43,6 +43,9 @@ function hosting_drush_command() {
       '@context_name' => 'Context to work on',
       'command' => 'provision-[command] to invoke',
     ),
+    'options' => array(
+      'force' => "Force the specified task to execute even if it's not queued to run.",
+    ),
     'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL
   );
 
diff --git a/modules/hosting/hosting.install b/modules/hosting/hosting.install
index 4fcca1c..6bf1171 100755
--- a/modules/hosting/hosting.install
+++ b/modules/hosting/hosting.install
@@ -360,3 +360,41 @@ function hosting_update_6014() {
   $ret[] = update_sql("UPDATE {system} SET weight = 0 WHERE type='module' and name='hosting'");
   return $ret;
 }
+
+/**
+ * Delete URL aliases for sites that have been deleted.
+ *
+ * Ideally we'd do this in a single DB query, but there isn't a nice performant
+ * way to do it, so we do more DB queries instead of using potentially a lot of
+ * memory. Basically this may take a long time to run, but it shouldn't run out
+ * of resources doing so.
+ */
+function hosting_update_6015(&$sandbox) {
+  $ret = array();
+
+  if (!isset($sandbox['progress'])) {
+    $sandbox['progress'] = 0;
+    $sandbox['current_pid'] = 0;
+    $sandbox['max'] = db_result(db_query('SELECT COUNT(pid) FROM {url_alias}'));
+  }
+
+  $aliases = db_query_range("SELECT pid, src, dst FROM {url_alias} WHERE dst LIKE 'hosting/c/%' AND pid > %d ORDER BY pid ASC", $sandbox['current_pid'], 0, 50);
+
+  while ($alias = db_fetch_object($aliases)) {
+    // Get the node ID for the alias.
+    $nid = preg_replace('#^node/#', '', $alias->src);
+    if (is_numeric($nid)) {
+      // Check to see if the corresponding context has been deleted.
+      if (!db_result(db_query('SELECT COUNT(nid) FROM {hosting_context} WHERE nid = %d', $nid))) {
+        db_query('DELETE FROM {url_alias} WHERE pid = %d', $alias->pid);
+      }
+    }
+
+    $sandbox['progress']++;
+    $sandbox['current_pid'] = $alias->pid;
+  }
+
+  $ret['#finished'] = empty($sandbox['max']) ? 1 : ($sandbox['progress'] / $sandbox['max']);
+
+  return $ret;
+}
diff --git a/modules/hosting/hosting.module b/modules/hosting/hosting.module
index 4a00e07..4439760 100755
--- a/modules/hosting/hosting.module
+++ b/modules/hosting/hosting.module
@@ -100,6 +100,10 @@ function hosting_js_page() {
   $args = func_get_args();
   $path = implode('/', $args);
 
+  // Incase Aegir is running in a sub-directory the base_path should be stripped away here
+  //    Remove the leading slash from base_path as $path doesn't have one either
+  $path = str_replace(ltrim(base_path(), '/'), '', $path);
+
   menu_set_active_item($path);
 #  $_SERVER['REQUEST_URI'] = str_replace('/hosting/js', '', $_SERVER['REQUEST_URI']);
 
@@ -459,26 +463,32 @@ function _hosting_setup_cron() {
   exec('crontab -l 2> /dev/null', $cron);
   variable_set('hosting_cron_backup', $cron);
   if (sizeof($cron)) {
-    drush_log("Your existing cron entry will be replaced.", 'warning');
-    exec('crontab -r 2> /dev/null');
-    $cron = array();
+    drush_log(dt("Replacing existing crontab"), 'warning');
   }
   else {
     drush_log(dt("No existing crontab was found"), 'message');
   }
 
-  $cron[] = hosting_queues_cron_cmd();
+  $cron = hosting_queues_cron_cmd();
 
-  $tmpnam = tempnam('hostmaster', 'hm.cron');
-  $fp = fopen($tmpnam, "w");
-  foreach ($cron as $line) {
-    fwrite($fp, $line . "\n");
+  $fp = popen('crontab -', 'w');
+  $success = TRUE;
+  if ($fp) {
+    if (fwrite($fp, $cron) && fwrite($fp, "\n")) {
+      drush_log(dt("Installed hosting-dispatch cron entry to run every minute"), 'success');
+    } else {
+      $success = FALSE;
+    }
+    // pclose returns shell exit codes (ie. 0 is success)
+    if (pclose($fp)) {
+      $success = FALSE;
+    }
+  } else {
+    $success = FALSE;
+  }
+  if (!$success) {
+    drush_set_error('PROVISION_CRON_FAILED', dt('Failed to install cron job'));
   }
-  fclose($fp);
-  system(sprintf('crontab %s', escapeshellarg($tmpnam)));
-  unlink($tmpnam);
-  drush_log(dt("Installed hosting-dispatch cron entry to run every minute"), 'message');
-  return null;
 }
 
 /**
@@ -836,6 +846,7 @@ function hosting_context_register($nid, $name) {
  *   The nid of the node to remove the association from.
  */
 function hosting_context_delete($nid) {
+  db_query("DELETE FROM {url_alias} WHERE src='node/%d'", $nid);
   db_query("DELETE FROM {hosting_context} WHERE nid=%d", $nid);
 }
 
diff --git a/modules/hosting/hosting.queues.inc b/modules/hosting/hosting.queues.inc
index ac99c98..60b04c7 100644
--- a/modules/hosting/hosting.queues.inc
+++ b/modules/hosting/hosting.queues.inc
@@ -6,13 +6,6 @@
  */
 
 /**
- * @deprecated not used anywhere, gone in 2.x
- */
-function _hosting_watchdog($entry) {
-  watchdog($entry['type'], $entry['message']);
-}
-
-/**
  * @defgroup backend-frontend-IPC
  * @{
  * Aegir is based on a very important distinction between the
@@ -96,8 +89,7 @@ function hosting_get_queues($refresh = FALSE) {
         $threads = $queue['total_items'] / $queue['threshold'];
         if ($threads <= $queue['min_threads']) {
           $threads = $queue['min_threads'];
-        }
-        elseif ($thread > $queue['max_threads']) {
+        } elseif ($thread > $queue['max_threads']) {
           $threads = $queue['max_threads'];
         }
         $queue['calc_threads'] = $threads;
@@ -143,65 +135,33 @@ function hosting_run_queue() {
 }
 
 /**
- * Retrieve a list of outstanding tasks.
+ * Calculate the time at which the task queue will run next.
  *
- * @param limit
- *   The amount of items to return.
- * @return
- *   An associative array containing task nodes, indexed by node id.
- */
-function _hosting_get_new_tasks($limit = 20) {
-  $return = array();
-  $result = db_query("SELECT t.nid FROM {hosting_task} t INNER JOIN {node} n ON t.vid = n.vid WHERE t.task_status = %d GROUP BY t.rid ORDER BY n.changed, n.nid ASC LIMIT %d", 0, $limit);
-  while ($node = db_fetch_object($result)) {
-    $return[$node->nid] =  node_load($node->nid);
-  }
-  return $return;
-}
-
-/**
- * Process the hosting task queue.
+ * There are two possibilities here - the task was never run, in which
+ * case we compute the next time it was run.
  *
- * Iterates through the list of outstanding tasks, and execute the commands on
- * the back end.
- */
-function hosting_tasks_queue($count = 20) {
-  global $provision_errors;
-
-  drush_log(dt("Running tasks queue"));
-  $tasks = _hosting_get_new_tasks($count);
-  foreach ($tasks as $task) {
-    drush_backend_fork("hosting-task", array($task->nid));
-  }
-}
-
-/**
- * @deprecated this isn't called from anywhere, and nobody implements
- * provision_args
- */
-function hosting_queues_get_arguments($task) {
-  $data = module_invoke_all('provision_args', $task, $task->task_type);
-  foreach ($data as $key => $value) {
-    if (substr($key, 0, 1) == '#') {
-      $data[(int) str_replace('#', '', $key)] = $value;
-      unset($data[$key]);
-    }
-  }
-
-  ksort($data);
-  return $data;
-}
-
-/**
- * @deprecated this is not used or called from anywhere
+ * The second case is the case where the task wasn't run in the last
+ * queue run even though it was scheduled, so we compute the next
+ * iteration.
+ *
+ * @param $queue mixed
+ *   the queue name or a queue array as returned by
+ *   hosting_get_queues()
+ *
+ * @return integer
+ *   the date at which the queue will run as a number of seconds since
+ *   the UNIX epoch
  */
-function _hosting_backend_invoke($cmd, $task) {
-  $proc = _drush_proc_open($cmd, FALSE);
-  if ($proc['output']) {
-    $values = drush_backend_parse_output($proc['output'], FALSE);
-
+function _hosting_queue_next_run($queue) {
+  if (!is_array($queue)) {
+    $queues = hosting_get_queues();
+    $queue = $queues[$queue];
   }
-  return FALSE;
+  $freq = $queue['frequency'];
+  $last = $queue['last_run'];
+  $now = time();
+  return max($last + $freq,
+    ( $now - ( ($now - $last) % $freq ) ) + $freq );
 }
 
 function _hosting_queues_clean_output($return) {
diff --git a/modules/hosting/migrate/hosting_migrate.batch.inc b/modules/hosting/migrate/hosting_migrate.batch.inc
index 0c5fc48..14b9e60 100644
--- a/modules/hosting/migrate/hosting_migrate.batch.inc
+++ b/modules/hosting/migrate/hosting_migrate.batch.inc
@@ -159,7 +159,6 @@ function hosting_migrate_platform_submit($form, &$form_state) {
         }
       }
       break;
-
     case 2:
       // Create a task node for logging purposes.
       $current = $form_state['storage']['current_platform'];
diff --git a/modules/hosting/migrate/hosting_migrate.js b/modules/hosting/migrate/hosting_migrate.js
index 1a4c668..f9ad2f6 100644
--- a/modules/hosting/migrate/hosting_migrate.js
+++ b/modules/hosting/migrate/hosting_migrate.js
@@ -19,7 +19,7 @@ function hostingMigrateComparisonInline(elem) {
     );
   }
  
-  $.get('/hosting/js' + $(elem).attr('href'), null, hostingMigrateCallback );
+  $.get(Drupal.settings.basePath + 'hosting/js' + $(elem).attr('href'), null, hostingMigrateCallback );
 }
 
 function hostingMigrateToggleSize() {
diff --git a/modules/hosting/migrate/hosting_migrate.module b/modules/hosting/migrate/hosting_migrate.module
index 5601906..50dcc75 100755
--- a/modules/hosting/migrate/hosting_migrate.module
+++ b/modules/hosting/migrate/hosting_migrate.module
@@ -78,8 +78,8 @@ function hosting_task_migrate_form_validate($form, &$form_state) {
     if (!_hosting_valid_fqdn($url)) {
       form_set_error('title', t("You have not specified a valid url for this site."));
     }
-    if (hosting_site_exists($url)) {
-      form_set_error('title', t("The domain name you have specified is not unique."));
+    if (!hosting_domain_allowed($url)) {
+      form_set_error('title', t("The domain name you have specified is not unique or not allowed."));
     }
   }
 
diff --git a/modules/hosting/platform/hosting_platform.drush.inc b/modules/hosting/platform/hosting_platform.drush.inc
index e1daf01..fd0e2a0 100644
--- a/modules/hosting/platform/hosting_platform.drush.inc
+++ b/modules/hosting/platform/hosting_platform.drush.inc
@@ -15,6 +15,12 @@ function hosting_hosting_platform_context_options(&$task) {
   if ($task->ref->makefile) {
     $task->context_options['makefile'] = $task->ref->makefile;
   }
+  if (isset($task->ref->make_working_copy) && !empty($task->ref->make_working_copy)) {
+    $task->context_options['make_working_copy'] = $task->ref->make_working_copy;
+  }
+  else {
+    $task->context_options['make_working_copy'] = 'null';
+  }
 }
 
 /**
@@ -25,7 +31,10 @@ function hosting_platform_drush_context_import($context, &$node) {
     $node->title = str_replace('platform_', '', trim($context->name, '@'));
     $node->web_server = hosting_drush_import($context->web_server);
     $node->publish_path = $context->root;
-    $node->makefile = $context->makefile; 
+    $node->makefile = $context->makefile;
+    if (isset($context->make_working_copy) && !empty($context->make_working_copy)) {
+      $node->make_working_copy = $context->make_working_copy;
+    }
   }
 }
 
diff --git a/modules/hosting/platform/hosting_platform.install b/modules/hosting/platform/hosting_platform.install
index a4b2b20..cf393b3 100644
--- a/modules/hosting/platform/hosting_platform.install
+++ b/modules/hosting/platform/hosting_platform.install
@@ -53,6 +53,12 @@ function hosting_platform_schema() {
         'not null' => TRUE,
         'default' => 0,
       ),
+      'make_working_copy' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
     ),
     'primary key' => array('vid'),
   );
@@ -141,3 +147,22 @@ function hosting_platform_update_6004() {
     variable_set('hosting_platform_update_6004_run', true);
   }
 }
+
+/**
+ * Add the 'make_working_copy' column.
+ */
+function hosting_platform_update_6205() {
+  $ret = array();
+  $spec = array(
+    'make_working_copy' => array(
+      'type' => 'int',
+      'unsigned' => TRUE,
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+  );
+  foreach ($spec as $field => $field_spec) {
+    db_add_field($ret, 'hosting_platform', $field, $field_spec);
+  }
+  return $ret;
+}
diff --git a/modules/hosting/platform/hosting_platform.js b/modules/hosting/platform/hosting_platform.js
new file mode 100644
index 0000000..35f02d3
--- /dev/null
+++ b/modules/hosting/platform/hosting_platform.js
@@ -0,0 +1,29 @@
+(function($) {
+  Drupal.behaviors.aegir_make_working_copy = function (context) {
+    $('.hosting-platform-working-copy-source:not(.hosting-platform-working-copy-processed)', context)
+      .addClass('hosting-platform-working-copy-processed')
+      .bind('change', function() {
+        Drupal.hosting_platform_working_copy.update_visibility($(this));
+      })
+      .bind('keyup', function() {
+        Drupal.hosting_platform_working_copy.update_visibility($(this));
+      })
+      .each(function() {
+        Drupal.hosting_platform_working_copy.update_visibility($(this));
+      });
+  }
+  
+  Drupal.hosting_platform_working_copy = Drupal.hosting_platform_working_copy || {};
+  
+  Drupal.hosting_platform_working_copy.update_visibility = function($elem) {
+    if ($elem.val()) {
+      $('.hosting-platform-working-copy-target').parents('.form-item')
+        .show();
+    }
+    else {
+      $('.hosting-platform-working-copy-target').parents('.form-item')
+        .hide();
+    }
+  }
+  
+})(jQuery);
diff --git a/modules/hosting/platform/hosting_platform.module b/modules/hosting/platform/hosting_platform.module
index a4cb8ed..15fbfe8 100644
--- a/modules/hosting/platform/hosting_platform.module
+++ b/modules/hosting/platform/hosting_platform.module
@@ -30,11 +30,29 @@ define('HOSTING_PLATFORM_ENABLED', 1);
  */
 function hosting_platform_menu() {
   $items = array();
+
   $items['hosting/platforms'] = array(
     'title' => 'Platforms',
     'description' => 'List of platforms',
     'page callback' => 'hosting_platform_listing',
-    'access arguments' => array('view platform'));
+    'access arguments' => array('view platform'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+
+  $items['hosting/platforms/list'] = array(
+    'title' => 'List',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'weight' => -10,
+  );
+
+  $items['hosting/platforms/add'] = array(
+    'title' => 'Add platform',
+    'type' => MENU_LOCAL_TASK,
+    'page callback' => 'drupal_goto',
+    'page arguments' => array('node/add/platform'),
+    'access callback' => 'node_access',
+    'access arguments' => array('create', 'platform'),
+  );
 
   return $items;
 }
@@ -209,6 +227,18 @@ function hosting_platform_form(&$node) {
     '#default_value' => $node->makefile,
     '#maxlength' => 255,
   );
+  
+  $form['make_working_copy'] = array(
+    '#type' => 'radios',
+    '#title' => t('Drush make option'),
+    '#default_value' => isset($form['#node']->make_working_copy) ? $form['#node']->make_working_copy : FALSE,
+    '#options' => array(
+      FALSE => t('Normal - Discards SCM files'),
+      TRUE => t('Working copy - preserves SCM files'),
+    ),
+  );
+  
+  $form['#after_build'][] = 'hosting_platform_form_platform_after_build';
 
   $servers = hosting_get_servers('http');
   if (sizeof($servers) > 1) {
@@ -234,6 +264,26 @@ function hosting_platform_form(&$node) {
   return $form;
 }
 
+function hosting_platform_form_platform_after_build($form) {
+  
+  drupal_add_js(drupal_get_path('module', 'hosting_platform') . '/hosting_platform.js');
+  if (isset($form['makefile']['#attributes']['class'])) {
+    $form['makefile']['#attributes']['class'] .= ' hosting-platform-working-copy-source';
+  }
+  else {
+    $form['makefile']['#attributes']['class'] = ' hosting-platform-working-copy-source';
+  }
+  
+  if (isset($form['make_working_copy']['#attributes']['class'])) {
+    $form['make_working_copy']['#attributes']['class'] .= ' hosting-platform-working-copy-target';
+  }
+  else {
+    $form['make_working_copy']['#attributes']['class'] = ' hosting-platform-working-copy-target';
+  }
+  
+  return $form;
+}
+
 /**
  * Hide the delete button on platform nodes.
  */
@@ -254,8 +304,8 @@ function hosting_platform_insert($node) {
   if (!isset($node->no_verify)) {
     hosting_add_task($node->nid, 'verify');
   }
-  db_query("INSERT INTO {hosting_platform} (vid, nid, publish_path, makefile, verified, web_server, status) VALUES (%d, %d, '%s', '%s', %d, %d, %d)",
-    $node->vid, $node->nid, $node->publish_path, $node->makefile, $node->verified, $node->web_server, $node->platform_status);
+  db_query("INSERT INTO {hosting_platform} (vid, nid, publish_path, makefile, verified, web_server, status, make_working_copy) VALUES (%d, %d, '%s', '%s', %d, %d, %d, %d)",
+    $node->vid, $node->nid, $node->publish_path, $node->makefile, $node->verified, $node->web_server, $node->platform_status, $node->make_working_copy);
   if (!$node->old_vid) {
     hosting_context_register($node->nid, 'platform_' . preg_replace("/[!\W]/", "", $node->title));
   }
@@ -276,8 +326,8 @@ function hosting_platform_update($node) {
     if ($node->platform_status == HOSTING_PLATFORM_DELETED) {
       $node->no_verify = TRUE;
     }
-    db_query("UPDATE {hosting_platform} SET publish_path = '%s', makefile = '%s', web_server = %d, verified = %d, status= %d WHERE nid=%d",
-              $node->publish_path, $node->makefile, $node->web_server, $node->verified, $node->platform_status, $node->nid);
+    db_query("UPDATE {hosting_platform} SET publish_path = '%s', makefile = '%s', web_server = %d, verified = %d, status= %d, make_working_copy = %d WHERE nid=%d",
+              $node->publish_path, $node->makefile, $node->web_server, $node->verified, $node->platform_status, $node->make_working_copy, $node->nid);
   }
   if (!$node->no_verify) {
     hosting_add_task($node->nid, 'verify');
@@ -330,7 +380,7 @@ function hosting_platform_validate($node, &$form) {
  *    Node object
  */
 function hosting_platform_load($node) {
-  $additions = db_fetch_object(db_query('SELECT publish_path, makefile, verified, web_server, status AS platform_status FROM {hosting_platform} WHERE vid = %d', $node->vid));
+  $additions = db_fetch_object(db_query('SELECT publish_path, makefile, verified, web_server, status AS platform_status, make_working_copy FROM {hosting_platform} WHERE vid = %d', $node->vid));
   $iid = db_result(db_query("SELECT iid FROM {hosting_package_instance} i left join {hosting_package} p on p.nid=i.package_id WHERE p.package_type='platform' AND i.rid=%d", $node->nid));
   $additions->release = hosting_package_instance_load($iid);
   $additions->profiles = hosting_get_profiles($node->nid, 'short_name');
@@ -362,7 +412,7 @@ function hosting_platform_view($node, $teaser = FALSE, $page = FALSE) {
   modalframe_parent_js();
 
   $node->content['info'] = array(
-    '#prefix' => '<div id="hosting-platform-info">',
+    '#prefix' => '<div id="hosting-platform-info" class="hosting-info-list">',
     '#suffix' => '</div>'
   );
 
diff --git a/modules/hosting/queued/README.txt b/modules/hosting/queued/README.txt
new file mode 100644
index 0000000..cef01dc
--- /dev/null
+++ b/modules/hosting/queued/README.txt
@@ -0,0 +1,86 @@
+Hosting queue daemon
+====================
+
+Simple Drupal module intended to make it easy to run the Aegir tasks
+queue with near-instant execution times. The daemon is designed to run
+standalone, and started through regular services: there's an init.d
+script available, which is installed with the Debian package, but that
+you will need to manually install in other platforms.
+
+Note that before the service is setup and the daemon can be started,
+it needs to be enabled as a module in the frontend.
+
+Install this module in your main hostmaster (Aegir) site. You can
+enable the feature from: `admin/hosting`. This will disable your
+hosting tasks queue for you, ready for you to enable the daemon.
+
+The daemon logs some of its activities to the Drupal watchdog.
+
+Installing as a service
+-----------------------
+
+Those instructions will setup the daemon to run as a regular service
+in /etc/init.d/ - instructions will vary according to platforms, the
+following should work in Debian, running as root.
+
+1. Install the init script in place
+
+        cp init.d.example /etc/init.d/hosting-queued
+
+2. Setup symlinks and runlevels
+
+        update-rc.d hosting-queued defaults
+
+3. Start the daemon
+
+        /etc/init.d/hosting-queued
+
+Supervisord configuration instructions
+--------------------------------------
+
+You can also use a daemon like supervisor to make sure the daemon is
+restarted if it crashes, but this is optional. An example
+configuration file (hosting_queued.conf) is included.
+
+These instructions are for Debian based linux distributions, you may need to
+adjust settings for other distributions.
+
+1. Install supervisor
+
+        sudo apt-get install supervisor
+
+2. Copy the `hosting_queued.sh` script from the module directory to the
+   root of the Aegir home directory (usually `/var/aegir`). You will want to
+   ensure that the script is executable and owned by the Aegir user:
+
+        chown aegir:aegir hosting_queued.sh
+        chmod 700 hosting_queued.sh
+
+3. Copy the supervisor example configuration file from the module directory
+   to the conf.d directory of supervisor.
+
+        cp hosting_queued.conf /etc/supervisor/conf.d/
+
+    Adjust the settings in that file to match your environment. If you have a
+    standard Aegir setup, and have followed the README so far, then you
+    shouldn't need to change anything.
+
+4. Restart supervisor and add a task to your hosting tasks queue in Aegir,
+   re-verify a site and see if it executes then you're all set up!
+   Supervisor keeps a log about the execution of the queue daemon that may be
+   useful if you are trying to resolve an issue where your tasks are not being
+   executed. The output from the queue daemon is also logged by supervisor to
+   (by default) `/var/log/hosting_queued` it may be useful to view this
+   log occasionally to ensure that there are no errors being logged. 'Duplicate
+   task' errors, if you get them are nothing to worry about however.
+
+Troubleshooting
+---------------
+
+Try to run the bash script from the command line as the Aegir user yourself, if
+you can do this, then the issue is with Supervisor, otherwise it might be an
+issue with this module/script.
+
+Look into the Drupal watchdog to see when the daemon has been started
+or was restarted. The settings page should also tell you the last time
+the daemon was started.
diff --git a/modules/hosting/queued/hosting.feature.queue_runner.inc b/modules/hosting/queued/hosting.feature.queue_runner.inc
new file mode 100644
index 0000000..e123d96
--- /dev/null
+++ b/modules/hosting/queued/hosting.feature.queue_runner.inc
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * @file
+ *   The hosting feature definition for the hosting queue daemon.
+ */
+
+/**
+ * Register a hosting feature with Aegir.
+ *
+ * This will be used to generate the 'admin/hosting' page.
+ *
+ * @return
+ *  associative array indexed by feature key.
+ */
+function hosting_queued_hosting_feature() {
+  $features['queued'] = array(
+    // title to display in form
+    'title' => t('Hosting queue daemon'),
+    // description
+    'description' => t('Runs the hosting tasks queue as a daemonized process.'),
+    // initial status ( HOSTING_FEATURE_DISABLED, HOSTING_FEATURE_ENABLED, HOSTING_FEATURE_REQUIRED )
+    'status' => HOSTING_FEATURE_DISABLED,
+    // module to enable/disable alongside feature
+    'module' => 'hosting_queued',
+    // associate with a specific node type.
+    //  'node' => 'nodetype',
+    // which group to display in ( null , experimental )
+    'group' => 'experimental'
+  );
+  return $features;
+}
diff --git a/modules/hosting/queued/hosting_queued.admin.inc b/modules/hosting/queued/hosting_queued.admin.inc
new file mode 100644
index 0000000..0299fb4
--- /dev/null
+++ b/modules/hosting/queued/hosting_queued.admin.inc
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * Configuration form for backup schedules
+ */
+function hosting_queued_settings_form() {
+
+  $form['description'] = array(
+    '#type' => 'markup',
+    '#value' => t('Note that the settings on this form will only apply to the daemon once it has been restarted, which by default happens as least once an hour.'),
+    '#weight' => -100,
+  );
+
+  $last_seen = variable_get('hosting_queued_process_started', NULL);
+  $form['hosting_queued_process_started'] = array(
+    '#type' => 'item',
+    '#title' => t('Runner status'),
+    '#value' => !empty($last_seen) ? t('Last started: @interval ago.', array('@interval' => format_interval(time() - $last_seen))) : t('Never started.'),
+  );
+
+  $form['hosting_queued_post_task_delay'] = array(
+    '#type' => 'select',
+    '#title' => t('Post task delay'),
+    '#description' => t('Tasks are executed as fast as possible, so you may wish to add a delay after the execution of each task. After this delay, new tasks will still start executing almost instantly.'),
+    '#default_value' => variable_get('hosting_queued_post_task_delay', 0),
+    '#options' => array(
+      0 => t('No delay'),
+    ) + drupal_map_assoc(range(1, 60), '_hosting_queued_settings_form_delay_callback'),
+  );
+
+  $form['hosting_queued_process_lifetime'] = array(
+    '#type' => 'select',
+    '#title' => t('Process lifetime timeout'),
+    '#description' => t('Because of memory leaks and bugs in PHP, the daemon automatically stops after this delay, and is restarted. If you are running a lot of tasks, you may want to lower this so it gets restarted more often. In empirical tests, it was found that around 100KB are leaked for every task fired.'),
+    '#default_value' => variable_get('hosting_queued_process_lifetime', 3600),
+    '#options' => drupal_map_assoc(array(
+      60,
+      60 * 5,
+      60 * 10,
+      60 * 15,
+      60 * 20,
+      60 * 25,
+      60 * 30,
+      60 * 35,
+      60 * 40,
+      60 * 45,
+      60 * 50,
+      60 * 55,
+      60 * 60,
+    ), 'format_interval'),
+  );
+
+  return system_settings_form($form);
+}
+
+function _hosting_queued_settings_form_delay_callback($value) {
+  return format_plural($value, '1 second', '@count seconds');
+}
diff --git a/modules/hosting/queued/hosting_queued.conf b/modules/hosting/queued/hosting_queued.conf
new file mode 100644
index 0000000..057ac6d
--- /dev/null
+++ b/modules/hosting/queued/hosting_queued.conf
@@ -0,0 +1,10 @@
+[program:hosting_queued]
+; Adjust the next line to point to where you copied the script.
+command=/var/aegir/hosting_queued.sh
+user=aegir
+numprocs=1
+stdout_logfile=/var/log/hosting_queued
+autostart=TRUE
+autorestart=TRUE
+; Tweak the next line to match your environment.
+environment=HOME="/var/aegir",USER="aegir",DRUSH_COMMAND="/var/aegir/drush/drush"
diff --git a/modules/hosting/queued/hosting_queued.drush.inc b/modules/hosting/queued/hosting_queued.drush.inc
new file mode 100644
index 0000000..97b5fac
--- /dev/null
+++ b/modules/hosting/queued/hosting_queued.drush.inc
@@ -0,0 +1,208 @@
+<?php
+
+/**
+ * @file
+ * Dispatcher daemon
+ *
+ * This file is the heart of the dispatcher drush command. It
+ * implements most of the backend functionality.
+ */
+
+// This is necessary for signal handling to work
+declare(ticks=1);
+
+/**
+ * Implementation of hook_drush_command().
+ */
+function hosting_queued_drush_command() {
+  $items = array();
+
+  $items['hosting-queued'] = array(
+    'description' => 'Runs the tasks queue',
+    'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
+    'drupal dependencies' => array(
+      'hosting_queued',
+    ),
+    // We need this get around a drush bug, see: http://drupal.org/node/704848
+    // But we remove it below for Drush 4.5 and above.
+    'callback' => 'drush_hosting_queued',
+    'options' => array('onetime' => array('description' => dt('exit if there are no more tasks queued after the 1 second poll timeout.'))),
+  );
+
+  // We don't need the callback defined for Drush > 4.4
+  if (defined('DRUSH_VERSION') && version_compare(DRUSH_VERSION, '4.4', '>')) {
+    unset($items['hosting-queued']['callback']);
+  }
+
+  return $items;
+}
+
+/**
+ * Drush command to execute hosting tasks.
+ */
+function drush_hosting_queued() {
+  if (function_exists('pcntl_signal')) {
+    // reload the server on SIGHUP
+    pcntl_signal(SIGHUP, 'hosting_queued_restart');
+    pcntl_signal(SIGINT, 'hosting_queued_stop');
+    pcntl_signal(SIGTERM, 'hosting_queued_stop');
+  }
+
+  // Set a nice high time limit, if we can:
+  if (function_exists('set_time_limit')) {
+    @set_time_limit(0);
+  }
+
+  // in some environments (e.g. in "productin") ENV is not actually
+  // set (!) so try to guess from $_SERVER
+  if (strpos(ini_get('variables_order'), 'E') === FALSE) {
+    if (strpos(ini_get('variables_order'), 'S') === FALSE) {
+      drush_log(dt('Neither $_ENV nor $_SERVER are available to set up proper environment inheritance; ensure E and/or S is set in your php.ini\'s "variables_order" setting.'), 'warning');
+    }
+    else {
+      $_ENV = $_SERVER;
+    }
+  }
+
+  $end_time = variable_get('hosting_queued_process_lifetime', 3600)  + time();
+
+  // Record the fact that we're running, so we can give some feedback in the
+  // frontend.
+  variable_set('hosting_queued_process_started', time());
+
+  watchdog('hosting_queued', 'Started Hosting queue daemon, waiting for new tasks');
+
+  while (TRUE) {
+    // Should we terminate.
+    if (time() > $end_time) {
+      // Restart the daemon to recycle leaked memory
+      hosting_queued_restart();
+    }
+
+    // Get some tasks to run
+    $tasks = _hosting_get_new_tasks();
+    foreach ($tasks as $task) {
+      // We sleep for a second just in case others want to run the task first.
+      // This guards against other processes that want to add a hosting task
+      // with arguments and run it immediately, they should be able to do this
+      // without us getting in there first.
+      // This is a workaround for http://drupal.org/node/1003536
+      drush_log(dt('Found task to execute. Pausing before execution.'));
+      sleep(1);
+
+      // Execute the task in the backend
+      drush_invoke_process('@self', 'hosting-task', array($task->nid));
+      drush_log(dt('Finished executing task.'));
+
+      // Delay for a configurable amount of time.
+      $delay = variable_get('hosting_queued_post_task_delay', 0);
+      if (!empty($delay)) {
+        drush_log(dt('Going to sleep for @count seconds after completing task.', array('@count' => $delay)));
+        sleep($delay);
+      }
+
+      // We're done with this task, this unset might help reduce memory usage.
+      unset($task);
+
+      // Should we terminate.
+      if (time() > $end_time) {
+        // Restart the daemon to recycle leaked memory
+        hosting_queued_restart();
+      }
+    }
+    // wait here only if we didn't process tasks
+    // this is to avoid an infinite loop if there are no tasks in the queue
+    if (!$tasks) {
+      sleep(1);
+    }
+    if (drush_get_option('onetime')) {
+      drush_log(dt("exiting after processing all tasks, as requested by --onetime"));
+      break;
+    }
+    unset($tasks);
+  }
+}
+
+/**
+ * Handle interruption signals gracefully
+ *
+ * We do not want to interrupt children tasks, so we wait for them
+ * before stopping.
+ */
+function hosting_queued_stop($signal) {
+  watchdog('hosting_queued', 'Received signal @signal, waiting for children to die.', array('@signal' => $signal));
+  $status = NULL;
+  pcntl_wait($status);
+  watchdog('hosting_queued', 'Stopped daemon');
+  exit($status);
+}
+
+/**
+ * Restart the dispatcher to work around memory leaks
+ */
+function hosting_queued_restart($signal = NULL) {
+  // If we received a singal, process it.
+  if (!is_null($signal)) {
+    watchdog('hosting_queued', 'Received signal @signal, waiting for children to die.', array('@signal' => $signal));
+    $status = NULL;
+    pcntl_wait($status);
+  }
+
+  // We need the PCNTL extension to be able to auto restart.
+  if (function_exists('pcntl_exec')) {
+    $drush_command = drush_get_command();
+    // should be hosting-queued unless something is very wrong
+    $command = $drush_command['command'];
+
+    // Get the drush executable and any arguments it needs.
+    $args = hosting_queued_drush_find_drush();
+    $drush = array_shift($args);
+
+    // Get the original options passed to this command.
+    $options = drush_get_context('cli');
+    // The 'php' option, if needed will be set in $args already.
+    unset($options['php']);
+
+    // We need to reimplement _drush_escape_option() because it adds
+    // extra leading spaces.
+    foreach ($options as $key => $value) {
+      if ($value !== TRUE) {
+        $args[] = "--$key=" . escapeshellarg($value);
+      }
+      else {
+        $args[] = "--$key";
+      }
+    }
+
+    array_push($args, '@hostmaster', $command);
+    watchdog('hosting_queued', 'Restarting queue daemon with @drush @args.', array('@drush' => $drush, '@args' => implode(" ", $args)));
+    pcntl_exec($drush, $args, $_ENV);
+    watchdog('hosting_queued', 'Could not restart the queue daemon, aborting.', array(), WATCHDOG_ERROR);
+    /* NOTREACHED */
+  }
+  else {
+    watchdog('hosting_queued', 'PCNTL not installed, unable to auto-restart.', array(), WATCHDOG_WARNING);
+  }
+  
+  // Explicit exit in case we're handling a signal
+  exit(1); 
+}
+
+/**
+ * Get the proper way to call drush again.
+ *
+ * Note that unlike drush_find_drush() we return an array of parts, and we trim
+ * the 'php' option of extra single quotes.
+ *
+ * @see drush_find_drush()
+ */
+function hosting_queued_drush_find_drush() {
+ $php = drush_get_option('php');
+ if (isset($php)) {
+    $php = trim($php, "'");
+    $drush = array($php, realpath($_SERVER['argv'][0]) ,  "--php='$php'");
+  } else {
+    $drush = array(realpath($_SERVER['argv']['0']));
+  }
+  return $drush;
+}
diff --git a/modules/hosting/queued/hosting_queued.info b/modules/hosting/queued/hosting_queued.info
new file mode 100644
index 0000000..6b51d04
--- /dev/null
+++ b/modules/hosting/queued/hosting_queued.info
@@ -0,0 +1,5 @@
+name = Hosting queue daemon
+description = Allows the hosting queue to be run in a daemon.
+package = Hosting
+dependencies[] = hosting
+core = 6.x
diff --git a/modules/hosting/queued/hosting_queued.install b/modules/hosting/queued/hosting_queued.install
new file mode 100644
index 0000000..04410a1
--- /dev/null
+++ b/modules/hosting/queued/hosting_queued.install
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * Implementation of hook_enable().
+ */
+function hosting_queued_enable() {
+  // Disable Aegir's dispatch of the tasks queue.
+  variable_set('hosting_queue_tasks_enabled', FALSE);
+  module_disable(array('hosting_queue_runner'));
+  drupal_uninstall_module('hosting_queue_runner');
+}
+
+/**
+ * Implementation of hook_disable().
+ */
+function hosting_queued_disable() {
+  // Enable Aegir's dispatch of the tasks queue.
+  variable_set('hosting_queue_tasks_enabled', TRUE);
+}
+
+/**
+ * Rename the module variables to hosting_queued
+ */
+function hosting_queued_update_6200() {
+  $ret = array();
+  $ret[] = update_sql("UPDATE {variable} SET name = REPLACE(name, 'hosting_queue_runner', 'hosting_queued') WHERE name LIKE 'hosting_queue_runner%'");
+  return $ret;
+}
+
+/**
+ * Properly remove/uninstall the queue runner.
+ */
+function hosting_queued_update_6201() {
+  module_disable(array('hosting_queue_runner'));
+  drupal_uninstall_module('hosting_queue_runner');
+  return array();
+}
diff --git a/modules/hosting/queued/hosting_queued.module b/modules/hosting/queued/hosting_queued.module
new file mode 100644
index 0000000..3f306d5
--- /dev/null
+++ b/modules/hosting/queued/hosting_queued.module
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Implementation of hook_menu
+ */
+function hosting_queued_menu() {
+  $items['admin/hosting/queued'] = array(
+    'title' => 'Queue runner settings',
+    'description' => 'Configure the daemonized tasks queue daemon.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('hosting_queued_settings_form'),
+    'access arguments' => array('administer hosting queues'),
+    'type' => MENU_LOCAL_TASK,
+    'file' => 'hosting_queued.admin.inc',
+  );
+  return $items;
+}
diff --git a/modules/hosting/queued/hosting_queued.sh b/modules/hosting/queued/hosting_queued.sh
new file mode 100644
index 0000000..a2c7105
--- /dev/null
+++ b/modules/hosting/queued/hosting_queued.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+$DRUSH_COMMAND @hostmaster hosting-queued
diff --git a/modules/hosting/queued/init.d.example b/modules/hosting/queued/init.d.example
new file mode 100755
index 0000000..b61483a
--- /dev/null
+++ b/modules/hosting/queued/init.d.example
@@ -0,0 +1,129 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          hosting-queued
+# Required-Start:    $network $local_fs
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Queue runner daemon for Aegir
+# Description:       This module allows the Hosting tasks queue for the
+#                    Aegir project to be 'daemonized' so that tasks
+#                    are run as soon as possible instead of waiting
+#                    for a cron run. This makes Aegir appear much more
+#                    responsive.
+### END INIT INFO
+
+# Author: Antoine Beaupré <anarcat@koumbit.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Aegir queue daemon"  # Introduce a short description here
+NAME="hosting-queued" # Introduce the short server's name here
+DAEMON=/usr/local/bin/drush      # Introduce the server's location here
+DAEMON_ARGS="--quiet @hostmaster $NAME" # Arguments to run the daemon with
+USER="aegir"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+NICE=10
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Define LSB functions.
+# XXX: unfortunately not supported by all platforms so we ignore this
+# for now, see http://fedoraproject.org/wiki/FCNewInit/Initscripts#Init_Script_Functions
+#. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+    su - $USER -- $DAEMON $DAEMON_ARGS &
+    ret=$?
+    echo $! > $PIDFILE
+    return $ret
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+    if [ -e $PIDFILE ]; then
+        kill `cat $PIDFILE`
+        ret=$?
+        rm -f $PIDFILE
+    else
+        ret=1
+    fi
+    return $ret
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+    kill -HUP `cat $PIDFILE`
+}
+
+case "$1" in
+    start)
+        [ "$VERBOSE" != no ] && printf "Starting $DESC... "
+        do_start
+        case "$?" in
+            0|1) [ "$VERBOSE" != no ] && echo ok ;;
+            2) [ "$VERBOSE" != no ] && echo FAIL ;;
+        esac
+        ;;
+    stop)
+        [ "$VERBOSE" != no ] && printf "Stopping $DESC... "
+        do_stop
+        case "$?" in
+            0|1) [ "$VERBOSE" != no ] && echo ok ;;
+            2) [ "$VERBOSE" != no ] && echo FAIL ;;
+        esac
+        ;;
+    status)
+        if [ -r $PIDFILE ] && ps `cat $PIDFILE` > /dev/null; then
+            [ "$VERBOSE" != no ] && echo $DESC is running
+            exit 0
+        else
+            ret=$?
+            [ "$VERBOSE" != no ] && echo "$DESC is not running"
+            exit $ret
+        fi
+        ;;
+    reload|force-reload)
+	[ "$VERBOSE" != no ] && printf "Reloading $DESC... "
+	do_reload && echo ok || echo FAIL
+	;;
+    restart)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	[ "$VERBOSE" != no ] && printf "Restarting $DESC... "
+	do_stop
+	case "$?" in
+	    0|1)
+		do_start
+		;;
+	    *)
+	  	# Failed to stop
+                ret=$?
+		[ "$VERBOSE" != no ] && echo FAIL
+                return $ret
+		;;
+	esac
+	;;
+    *)
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:
diff --git a/modules/hosting/server/hosting.ip.inc b/modules/hosting/server/hosting.ip.inc
index 34e4f94..665e3d2 100644
--- a/modules/hosting/server/hosting.ip.inc
+++ b/modules/hosting/server/hosting.ip.inc
@@ -1,5 +1,5 @@
 <?php
-// $Id$
+// $Id$ 
 /**
  * @file General IP address CRUD routines.
  */
@@ -10,7 +10,7 @@
 function _hosting_ip_list($addresses) {
   $return = array();
   $ip_list = is_array($addresses) ? $addresses : explode("\n", $addresses);
-
+  
   foreach ($ip_list as $key => $ip) {
     $ip = trim($ip);
     if (!empty($ip)) {
@@ -32,7 +32,7 @@ function hosting_ip_view(&$node) {
       '#type' => 'item',
       '#title' => t('IP addresses'),
       '#value' => implode('<br />', $ip_list),
-    );
+    );  
   }
 }
 
@@ -47,14 +47,14 @@ function hosting_ip_save($node, $update = FALSE) {
   }
 
   foreach ($ip_list as $ip) {
-    db_query("INSERT INTO {hosting_ip_addresses} (vid, nid, ip_address) VALUES (%d, %d, '%s')", $node->vid, $node->nid, $ip);
+    db_query("INSERT INTO {hosting_ip_addresses} (vid, nid, ip_address) VALUES (%d, %d, '%s')", $node->vid, $node->nid, $ip); 
   }
 }
 
 /**
  * Validate that IP list is valid. IP utility function for hook_validate.
  */
-function hosting_ip_validate($node) {
+function hosting_ip_validate($node) { 
   foreach (_hosting_ip_list($node->ip_addresses) as $ip) {
     if (!_hosting_valid_ip($ip)) {
       form_set_error('ip_addresses', t('Invalid IP address: %ip.', array(
diff --git a/modules/hosting/server/hosting_server.drush.inc b/modules/hosting/server/hosting_server.drush.inc
index c6970a5..0b89e4e 100644
--- a/modules/hosting/server/hosting_server.drush.inc
+++ b/modules/hosting/server/hosting_server.drush.inc
@@ -1,5 +1,11 @@
 <?php
 
+/**
+ * Pass options for the server verification to the backend.
+ *
+ * Here we pass the hostname, IP addresses, and setup the services for
+ * this server (?).
+ */
 function hosting_hosting_server_context_options(&$task) {
   $task->context_options['remote_host'] = $task->ref->title;
   $ip_list = _hosting_ip_list($task->ref->ip_addresses);
diff --git a/modules/hosting/server/hosting_server.module b/modules/hosting/server/hosting_server.module
index b879054..b52c8f1 100644
--- a/modules/hosting/server/hosting_server.module
+++ b/modules/hosting/server/hosting_server.module
@@ -21,11 +21,28 @@ function hosting_server_node_info() {
  */
 function hosting_server_menu() {
   $items = array();
+
   $items['hosting/servers'] = array(
     'title' => 'Servers',
     'description' => 'List of servers',
     'page callback' => 'hosting_server_listing',
     'access arguments' => array('view server'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+  
+  $items['hosting/servers/list'] = array(
+    'title' => 'List',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'weight' => -10,
+  );
+
+  $items['hosting/servers/add'] = array(
+    'title' => 'Add server',
+    'type' => MENU_LOCAL_TASK,
+    'page callback' => 'drupal_goto',
+    'page arguments' => array('node/add/server'),
+    'access callback' => 'node_access',
+    'access arguments' => array('create', 'server'),
   );
 
   return $items;
@@ -419,7 +436,7 @@ function hosting_server_view(&$node, $teaser = FALSE, $page = FALSE) {
   $services = hosting_server_services();
 
   $node->content['info'] = array(
-    '#prefix' => '<div id="hosting-server-info">',
+    '#prefix' => '<div id="hosting-server-info" class="hosting-info-list">',
     '#suffix' => '</div>'
   );
 
diff --git a/modules/hosting/site/hosting_site.drush.inc b/modules/hosting/site/hosting_site.drush.inc
index 246f106..8433e18 100644
--- a/modules/hosting/site/hosting_site.drush.inc
+++ b/modules/hosting/site/hosting_site.drush.inc
@@ -41,8 +41,6 @@ function hosting_site_drush_context_import($context, &$node) {
     $client = node_load(HOSTING_DEFAULT_CLIENT);
     if ($context->client_name) {
       $client = hosting_import_client($context->client_name);
-    } elseif ($context->client_email) {      // @deprecated - drop this after 1.x
-      $client = hosting_import_client($context->client_email);
     }
     $node->client = $client->nid;
   }
@@ -60,7 +58,7 @@ function drush_hosting_site_pre_hosting_task($task) {
     $task->args[1] = $backup['filename'];
   }
 
-  if ($task->task_type == 'backup_delete') {
+  if ($task->task_type == 'backup-delete') {
     foreach ($task->task_args as $bid => $filename) {
       if ($filename !== '0') {
         $backups[] = $filename;
@@ -186,8 +184,7 @@ function hosting_site_post_hosting_backup_task($task, $data) {
 function hosting_site_post_hosting_import_task($task, $data) {
   hosting_import_site($task->ref->nid, $data['context'], $task->ref->platform);
   
-  $context = $data['context'];
-  $packages = $context['packages'];
+  $packages = $data['context']['packages'];
   hosting_package_sync($packages);
   hosting_package_instance_sync($task->ref->nid, $packages);
 
diff --git a/modules/hosting/site/hosting_site.install b/modules/hosting/site/hosting_site.install
index 5c5b79e..77b015d 100644
--- a/modules/hosting/site/hosting_site.install
+++ b/modules/hosting/site/hosting_site.install
@@ -269,3 +269,48 @@ function hosting_site_update_6008() {
   return $ret;
 }
 
+/**
+ * Rename tasks login_reset and backup_delete to use dashes
+ *
+ * We re-named 'login_reset' tasks to 'login-reset' and 'backup_delete' to
+ * 'backup-delete'.
+ */
+function hosting_site_update_6200() {
+  $ret = array();
+  
+  $replacements = array(
+    'backup_delete' => 'backup-delete',
+    'login_reset' => 'login-reset',
+  );
+  
+  foreach ($replacements as $old => $new) {
+    db_query("UPDATE {hosting_task} SET task_type = '%s' where task_type = '%s'", $new, $old);
+  }
+  
+  return $ret;
+}
+
+/**
+ * Fix permissions for renamed tasks
+ *
+ * We re-named 'login_reset' tasks to 'login-reset' and 'backup_delete' to
+ * 'backup-delete' and so we need to fix any roles using those permissions.
+ */
+function hosting_site_update_6201() {
+  $ret = array();
+
+  $replacements = array(
+    'create backup_delete task' => 'create backup-delete task',
+    'create login_reset task' => 'create login-reset task',
+  );
+
+  // Process all the roles.
+  $roles = db_query('SELECT rid, perm FROM {permission}');
+  while ($role = db_fetch_object($roles)) {
+    $perms = explode(', ', $role->perm);
+    $perms = str_replace(array_keys($replacements), array_values($replacements), $perms);
+    db_query("UPDATE {permission} SET perm = '%s' where rid = %d", implode(', ', $perms), $role->rid);
+  }
+
+  return $ret;
+}
diff --git a/modules/hosting/site/hosting_site.module b/modules/hosting/site/hosting_site.module
index 660933a..30574d1 100644
--- a/modules/hosting/site/hosting_site.module
+++ b/modules/hosting/site/hosting_site.module
@@ -40,6 +40,22 @@ function hosting_site_menu() {
     'description' => 'Display a list of sites',
     'page callback' => 'hosting_sites',
     'access arguments' => array('view site'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+
+  $items['hosting/sites/list'] = array(
+    'title' => 'List',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'weight' => -10,
+  );
+
+  $items['hosting/sites/add'] = array(
+    'title' => 'Add site',
+    'type' => MENU_LOCAL_TASK,
+    'page callback' => 'drupal_goto',
+    'page arguments' => array('node/add/site'),
+    'access callback' => 'node_access',
+    'access arguments' => array('create', 'site'),
   );
 
   $items['hosting/hosting_site_form_check'] = array(
@@ -230,12 +246,12 @@ function hosting_site_hosting_tasks() {
     'dialog' => TRUE,
   );
 
-  $tasks['site']['login_reset'] = array(
+  $tasks['site']['login-reset'] = array(
      'title' => t('Reset password'),
      'description' => t('Generate a one-time login reset url for this site.'),
   );
 
-  $tasks['site']['backup_delete'] = array(
+  $tasks['site']['backup-delete'] = array(
      'title' => t('Delete backups'),
      'description' => t('Delete one or more backup files of a site.'),
      'dialog' => TRUE,
@@ -378,9 +394,6 @@ function hosting_import_site($site_id, $data, $platform) {
 
   if ($data['client_name']) {
     $client = hosting_import_client($data['client_name']);
-  } elseif ($data['client_email']) { 
-    // @deprecated drop this after 1.x
-    $client = hosting_import_client($data['client_email']);
   } 
 
   $site = node_load($site_id);
@@ -391,7 +404,7 @@ function hosting_import_site($site_id, $data, $platform) {
   $site->platform = $platform;
   $site->no_verify = TRUE;
   $site->verified = time();
-  $site->client = $client->nid;
+  $site->client = $client->nid ? $client->nid : HOSTING_DEFAULT_CLIENT;
   $site->ip_addresses = array_values($data['site_ip_addresses']);
   $site->cron_key = ($data['cron_key']) ? $data['cron_key'] : '';
 
@@ -448,16 +461,6 @@ function _hosting_site_status($node) {
 }
 
 /**
- * Check if a site exists in a somehow wrong way
- *
- * @see hosting_domain_allowed()
- * @deprecated
- */
-function hosting_site_exists($url, $nid = null) {
-  return !hosting_domain_allowed($url, array('nid' => $nid));
-}
-
-/**
  * Implementation of hook_allow_domain().
  *
  * @see hosting_domain_allowed()
diff --git a/modules/hosting/site/hosting_site.nodeapi.inc b/modules/hosting/site/hosting_site.nodeapi.inc
index 4645392..bcc8e09 100644
--- a/modules/hosting/site/hosting_site.nodeapi.inc
+++ b/modules/hosting/site/hosting_site.nodeapi.inc
@@ -12,7 +12,7 @@ function hosting_site_node_info() {
   $types["site"] =  array(
     "type" => 'site', "name" => 'Site',
     "module" => 'hosting_site',
-    "has_title" => TRUE, "title_label" => 'Domain name',
+    "has_title" => TRUE, "title_label" => 'Domain name', 
     "description" => hosting_node_help("site"),
     "has_body" => 0, "body_label" => '', "min_word_count" => 0);
   return $types;
@@ -24,7 +24,7 @@ function hosting_site_node_info() {
 function hosting_site_view(&$node, $teaser = false) {
   hosting_set_breadcrumb($node);
   modalframe_parent_js();
-  $node->content['info']['#prefix'] = '<div id="hosting-site-info">';
+  $node->content['info']['#prefix'] = '<div id="hosting-site-info" class="hosting-info-list">';
   if ($node->site_status == HOSTING_SITE_ENABLED) {
     $node->content['info']['link'] = array(
       '#value' => _hosting_site_goto_link($node),
@@ -46,7 +46,7 @@ function hosting_site_view(&$node, $teaser = false) {
     '#title' => t('Verified'),
     '#value' => hosting_format_interval($node->verified),
   );
-
+  
   $node->content['info']['platform'] = array(
     '#type' => 'item',
     '#title' => t('Platform'),
@@ -75,7 +75,7 @@ function hosting_site_view(&$node, $teaser = false) {
     );
   }
 
-  if ($node->nid) {
+  if ($node->nid) { 
     $node->content['info']['status'] = array(
       '#type' => 'item',
       '#title' => t('Status'),
@@ -87,12 +87,12 @@ function hosting_site_view(&$node, $teaser = false) {
 
   $node->content['info']['#suffix'] = '</div>';
 
-  if ($node->nid) {
+  if ($node->nid) { 
     $node->content['tasks_view'] = array(
       '#type' => 'item',
       '#value' => hosting_task_table($node),
       '#prefix' => '<div id="hosting-task-list">',
-      '#suffix' => '</div>',
+      '#suffix' => '</div>', 
       '#weight' => 10
     );
     $settings['hostingTaskRefresh'] = array(
diff --git a/modules/hosting/task.hosting.inc b/modules/hosting/task.hosting.inc
index 5e2e688..2d53f78 100644
--- a/modules/hosting/task.hosting.inc
+++ b/modules/hosting/task.hosting.inc
@@ -62,6 +62,9 @@ function drush_hosting_task_validate($id, $type = null) {
     if ($task->task_status == HOSTING_TASK_PROCESSING) {
       return drush_set_error('HOSTING_TASK_RUNNING', dt("This task is already running"));
     }
+    if ($task->task_status != HOSTING_TASK_QUEUED && !drush_get_option('force', false)) {
+      return drush_set_error('HOSTING_TASK_NOT_QUEUED', dt("This task is not queued, use --force"));
+    }
     $task->task_status = HOSTING_TASK_PROCESSING;
     $task->revision = TRUE;
     node_save($task);
@@ -111,7 +114,7 @@ function drush_hosting_task() {
       call_user_func($function, $task);
     }
 
-    $output = drush_backend_invoke_args('provision-save', array('@' . $task->ref->hosting_name), $task->context_options, $mode);
+    $output = drush_invoke_process('@none', 'provision-save', array('@' . $task->ref->hosting_name), $task->context_options, array('method' => $mode));
   }
  
   // Run the actual command. Adding alias here to work aorund Drush API.
@@ -124,7 +127,7 @@ function drush_hosting_task() {
 
   // On succesful delete, remove the named context.
   if ($task->task_type === 'delete' && $task->task_status === HOSTING_TASK_SUCCESS) {
-    $output = drush_backend_invoke_args('provision-save', array('@' . $task->ref->hosting_name), array('delete' => TRUE), $mode);
+    $output = drush_invoke_process('@none', 'provision-save', array('@' . $task->ref->hosting_name), array('delete' => TRUE), array('method' => $mode));
   }
 
   // New revision is created at the beginning of function.
diff --git a/modules/hosting/task/hosting_task.js b/modules/hosting/task/hosting_task.js
index 9fc9649..3a709eb 100644
--- a/modules/hosting/task/hosting_task.js
+++ b/modules/hosting/task/hosting_task.js
@@ -8,7 +8,14 @@ hostingTaskRefreshList = function() {
     if (Drupal.settings.hostingTaskRefresh.changed < data.changed) {
       // only reload if there is no modal frame currently open
       if ($(document).data('hostingOpenModalFrame') != true) {
-        document.location.reload();
+        // If a specific URL was specified, go there.
+        if (data.navigate_url) {
+          document.location = data.navigate_url;
+        }
+        // Fall back to just doing a reload of the current page.
+        else {
+          document.location.reload();
+        }
       }
     }
     else {
@@ -20,7 +27,7 @@ hostingTaskRefreshList = function() {
   }
  
   hostingTaskAddOverlay('#hosting-task-list');
-  $.get('/hosting/tasks/' + Drupal.settings.hostingTaskRefresh.nid + '/list', null, hostingTaskListRefreshCallback , 'json' );
+  $.get(Drupal.settings.basePath + 'hosting/tasks/' + Drupal.settings.hostingTaskRefresh.nid + '/list', null, hostingTaskListRefreshCallback , 'json' );
 }
 
 
@@ -42,7 +49,7 @@ function hostingTaskRefreshQueueBlock() {
   }
  
   hostingTaskAddOverlay('#hosting-task-queue-block');
-  $.get('/hosting/tasks/queue', null, hostingTaskQueueRefreshCallback , 'json' );
+  $.get(Drupal.settings.basePath + 'hosting/tasks/queue', null, hostingTaskQueueRefreshCallback , 'json' );
 }
 
 $(document).ready(function() {
@@ -63,7 +70,7 @@ hostingTaskBindButtons = function(elem) {
   $('.hosting-button-dialog', elem).click(function() {
       $(document).data('hostingOpenModalFrame', true)
      var options = {
-        url : '/hosting/js' + $(this).attr('href'),
+        url : Drupal.settings.basePath + 'hosting/js' + $(this).attr('href'),
         draggable : false,
         width : 600,
         height : 150,
diff --git a/modules/hosting/task/hosting_task.module b/modules/hosting/task/hosting_task.module
index 3772b81..ce5918b 100644
--- a/modules/hosting/task/hosting_task.module
+++ b/modules/hosting/task/hosting_task.module
@@ -8,13 +8,14 @@
  */
 function hosting_task_menu() {
   $items = array();
-  foreach (array('site', 'platform', 'server') as $type) {
-    if (!($tasks = hosting_available_tasks($type))) {
+  $tasks = hosting_available_tasks($type);
+  foreach ($tasks as $type => $type_tasks) {
+    if (empty($type_tasks)) {
       // this is to workaround problems in the upgrade path where the
       // hook returns nothing (e.g. for server)
       continue;
     }
-    foreach ($tasks as $task => $info) {
+    foreach ($type_tasks as $task => $info) {
       if (empty($info['hidden'])) {
         $path = sprintf("node/%%hosting_%s_node/%s_%s", $type, $type, $task);
         $items[$path] = array(
@@ -41,7 +42,7 @@ function hosting_task_menu() {
     'type' => MENU_CALLBACK
   );
 
-
+  
   $items['hosting/tasks/%node/cancel'] = array(
     'title' => t('Task list'),
     'description' => t('Callback for stopping tasks'),
@@ -52,7 +53,7 @@ function hosting_task_menu() {
     'type' => MENU_CALLBACK
   );
 
-
+  
   $items['hosting/tasks/queue'] = array(
     'title' => t('Task list'),
     'description' => t('AJAX callback for refreshing task queue'),
@@ -67,6 +68,7 @@ function hosting_task_menu() {
 function hosting_task_ajax_list($node) {
   $return['markup'] = hosting_task_table($node);
   $return['changed'] = $node->changed;
+  $return['navigate_url'] = url('node/' . $node->nid);
   drupal_json($return);
   exit();
 }
@@ -108,7 +110,7 @@ function hosting_task_cancel_access($node) {
 
   // 'administer tasks' allows cancelling any and all tasks on the system
   if (user_access('administer tasks')) {
-    return TRUE;
+    return TRUE;  
   }
   // 'cancel own tasks' allows cancelling any task the user *could have* created, on nodes she can view
   if (user_access('cancel own tasks') && user_access('create ' . $node->task_type . ' task') && node_access('view', $node)) {
@@ -136,10 +138,10 @@ function hosting_task_menu_access($node, $task) {
       if (hosting_task_outstanding($node->nid, 'delete') || ($node->site_status ==  HOSTING_SITE_DELETED)) {
         return FALSE;
       }
-      if (($task == 'login_reset') && ($node->site_status != HOSTING_SITE_ENABLED)) {
+      if (($task == 'login-reset') && ($node->site_status != HOSTING_SITE_ENABLED)) {
         return FALSE;
       }
-      $safe_tasks = array('backup', 'backup_delete', 'verify', 'enable');
+      $safe_tasks = array('backup', 'backup-delete', 'verify', 'enable');
       if (!in_array($task, $safe_tasks)) {
         // Don't show certain tasks if the site is the 'special' main aegir site
         $profile = node_load($node->profile);
@@ -147,7 +149,7 @@ function hosting_task_menu_access($node, $task) {
           return FALSE;
         }
       }
-
+     
       $site_enabled = (hosting_task_outstanding($node->nid, 'enable') || ($node->site_status == HOSTING_SITE_ENABLED));
       $deletable = ($task == "delete");
       $enabable = ($task == "enable");
@@ -181,11 +183,11 @@ function hosting_task_menu_access($node, $task) {
       if ($node->platform_status == HOSTING_PLATFORM_LOCKED) {
         $platform_tasks = array('verify', 'unlock', 'delete', 'migrate');
       }
-      else {
+      else {   
         // If the platform's unlocked, we can lock it, delete it or batch migrate sites
         $platform_tasks = array('verify', 'lock', 'delete', 'migrate');
       }
-      return (in_array($task, $platform_tasks));
+      return (in_array($task, $platform_tasks)); 
     }
     if ($node->type === 'server') {
       // If the user can't edit this node, he can't create tasks on it.
@@ -231,7 +233,7 @@ function hosting_task_node_info() {
   $types["task"] =  array(
     "type" => 'task', "name" => 'Task',
     "module" => 'hosting_task',
-    "has_title" => FALSE, "title_label" => '',
+    "has_title" => FALSE, "title_label" => '', 
     "description" => hosting_node_help("task"),
     "has_body" => 0, "body_label" => '', "min_word_count" => 0);
 
@@ -261,8 +263,8 @@ function hosting_task_perm() {
     'create verify task',
     'create lock task',
     'create unlock task',
-    'create login_reset task',
-    'create backup_delete task',
+    'create login-reset task',
+    'create backup-delete task',
     'view own tasks',
     'view task',
     'access task logs',
@@ -370,6 +372,8 @@ function hosting_add_task($nid, $type, $args = null, $status = HOSTING_TASK_QUEU
  }
  node_save($task);
 
+ drupal_set_message(t("Task %type was added to the queue. Next queue run is %date, server time is %time.", array('%type' => $type, '%date' => format_date(_hosting_queue_next_run('tasks'), 'custom', 'H:i:sO'), '%time' => format_date(time(), 'custom', 'H:i:sO'))));
+
  return $task;
 }
 /**
@@ -384,9 +388,9 @@ function hosting_task_confirm_form($form_state, $node, $task) {
     drupal_goto('node/' . $node->nid);
   }
 
-  $form['help'] = array('#value' => $tasks[$task]['description']);
+  $form['help'] = array('#value' => $tasks[$task]['description']); 
   $form['nid'] = array('#type' => 'value', '#value' => $node->nid);
-  $form['task'] = array('#type' => 'value', '#value' => $task);
+  $form['task'] = array('#type' => 'value', '#value' => $task); 
   $form['parameters'] = array('#tree' => TRUE);
   $func = 'hosting_task_' . str_replace('-', '_', $task) . '_form';
   if (function_exists($func)) {
@@ -402,7 +406,7 @@ function hosting_task_confirm_form($form_state, $node, $task) {
   $form = confirm_form($form, $question, 'node/' . $node->nid, '', $tasks[$task]['title']);
 
   // add an extra class to the actions to allow us to disable the cancel link via javascript for the modal dialog
-
+  
   $form['actions']['#prefix'] = '<div id="hosting-task-confirm-form-actions" class="container-inline">';
   return $form;
 }
@@ -424,8 +428,8 @@ function hosting_task_restore_form($node) {
   }
   else {
     $form['no_backups'] = array(
-      '#type' => 'item',
-      '#title' => t('Backups'),
+      '#type' => 'item', 
+      '#title' => t('Backups'), 
       '#value' => t('There are no valid backups available.')
     );
   }
@@ -443,7 +447,7 @@ function hosting_task_restore_form_validate($form, &$form_state) {
 
 /**
  * Implementation of hook_form_alter()
- */
+ */                               
 function hosting_task_backup_delete_form_validate($form, &$form_state) {
   if ($form['parameters']['no_backups']) {
     form_set_error('no_backups', t('There are no valid backups available.'));
@@ -471,7 +475,7 @@ function hosting_task_backup_delete_form($node) {
       '#title' => t('Backups'),
       '#value' => t('There are no valid backups available.')
     );
-  }
+  }  
   return $form;
 }
 
@@ -506,6 +510,21 @@ function hosting_task_set_title(&$node) {
 }
 
 /**
+ * Process the hosting task queue.
+ *
+ * Iterates through the list of outstanding tasks, and execute the commands on the back end.
+ */
+function hosting_tasks_queue($count = 20) {
+  global $provision_errors;
+
+  drush_log(dt("Running tasks queue"));
+  $tasks = _hosting_get_new_tasks($count);
+  foreach ($tasks as $task) {
+    drush_invoke_process('@self', "hosting-task", array($task->nid), array('invoke' => TRUE), array('fork' => TRUE));
+  }
+}
+
+/**
  * Determine whether there is an outstanding task of a specific type.
  *
  * This is used to ensure that there are not multiple tasks of the same type queued.
@@ -513,11 +532,11 @@ function hosting_task_set_title(&$node) {
 function hosting_task_outstanding($nid, $type) {
   $return = db_result(db_query("
       SELECT t.nid FROM {hosting_task} t
-        INNER JOIN {node} n ON t.vid = n.vid
-      WHERE
-        t.rid = %d
-        AND t.task_status = %d
-        AND t.task_type = '%s'
+        INNER JOIN {node} n ON t.vid = n.vid 
+      WHERE 
+        t.rid = %d 
+        AND t.task_status = %d 
+        AND t.task_type = '%s' 
         ORDER BY t.vid DESC
         LIMIT 1", $nid, HOSTING_TASK_QUEUED, $type));
   return $return;
@@ -548,15 +567,19 @@ function hosting_task_count_running() {
  * @see hook_hosting_tasks()
  * @see hosting_task_menu_access()
  */
-function hosting_available_tasks($type, $reset = FALSE) {
+function hosting_available_tasks($type = NULL, $reset = FALSE) {
   static $cache = array();
 
   if (!sizeof($cache) || $reset) {
     $cache = module_invoke_all('hosting_tasks');
     drupal_alter('hosting_tasks', $cache);
   }
-  return $cache[$type];
-
+  if ($type){
+    return $cache[$type];
+  }
+  else {
+    return $cache;
+  }
 }
 
 /**
@@ -574,7 +597,7 @@ function hosting_task_insert($node) {
            $node->vid, $node->nid, $key, $value);
     }
   }
-  hosting_task_set_title($node);
+  hosting_task_set_title($node); 
 }
 
 /**
@@ -600,7 +623,7 @@ function hosting_task_update($node) {
              $node->vid, $node->nid, $key, $value);
       }
     }
-
+      
   }
 }
 
@@ -661,7 +684,7 @@ function hosting_task_retry_form_submit($form, &$form_state) {
 function hosting_task_view($node, $teaser = FALSE, $page = FALSE) {
   drupal_add_js(drupal_get_path('module', 'hosting') . '/hosting.js');
   $node = node_prepare($node, $teaser);
-
+  
   $ref = node_load($node->rid);
 
   hosting_set_breadcrumb($node);
@@ -704,23 +727,11 @@ function hosting_task_view($node, $teaser = FALSE, $page = FALSE) {
   } else {
     $queues = hosting_get_queues();
     $queue = $queues['tasks'];
-    $freq = $queue['frequency'];
-    $last = $queue['last_run'];
-    $now = time();
-    # the first part is the regular case: the task was never run, compute the next time
-    # the second part is the case where the task wasn't run in the last queue run even though it was scheduled, so we compute the next iteration
-    $next = max($last + $freq, ( $now - ( ($now - $last) % $freq ) ) + $freq );
-    if ($freq < 60*60*12) { # 12h
-      # display only the time if we have short iterations
-      $date = format_date($next, 'custom', 'H:i:sO');
-    } else {
-      $date = format_date($next, 'medium');
-    }
-    $items = $queue['items'];
+    $next = _hosting_queue_next_run($queue);
     $node->content['info']['notexecuted'] = array(
       '#type' => 'item',
       '#title' => t('This task has not been processed yet'),
-      '#value' => t('It will be processed around %date, if the queue is not too crowded. The queue is currently run every %freq, was last run %last and processes %items items at a time. Server time is %time.', array('%freq' => format_interval($freq), '%date' => $date, '%last' => hosting_format_interval($last), '%items' => $items, '%time' => format_date($now, 'custom', 'H:i:sO'))),
+      '#value' => t('It will be processed around %date, if the queue is not too crowded. The queue is currently run every %freq, was last run %last and processes %items items at a time. Server time is %time.', array('%freq' => format_interval($queue['frequency']), '%date' => format_date($next, 'custom', 'H:i:sO'), '%last' => hosting_format_interval($queue['last_run']), '%items' => $queue['items'], '%time' => format_date(time(), 'custom', 'H:i:sO'))),
     );
   }
   if ($node->task_status) {
@@ -741,20 +752,20 @@ function hosting_task_view($node, $teaser = FALSE, $page = FALSE) {
   }
 
   if (user_access('access task logs')) {
-    if ($table = _hosting_task_log_table($node->vid)) {
+    if ($table = _hosting_task_log_table($node->vid)) { 
       $node->content['hosting_log'] = array(
         '#weight' => 10,
         '#type' => 'item',
         '#value' => $table
       );
     }
-  }
+  }    
   return $node;
 }
 
 /**
  * Display table containing the logged information for this task
- */
+ */ 
 function _hosting_task_log_table($vid) {
   $result = db_query("SELECT * FROM {hosting_task_log} WHERE vid = %d ORDER BY lid", $vid);
   if ($result) {
@@ -774,7 +785,7 @@ function _hosting_task_log_table($vid) {
     return theme("table", $header, (array) $rows, array('id' => 'hosting-task-log', 'class' => 'hosting-table'));
   }
 
-  return false;
+  return false; 
 }
 
 /**
@@ -837,14 +848,30 @@ function hosting_get_tasks($filter_by = null, $filter_value = null, $count = 5,
     $args[] = $filter_value;
   }
   $result = pager_query(db_rewrite_sql("SELECT n.*, t.task_status, t.task_type, t.rid FROM {node} n INNER JOIN {hosting_task} t on n.vid=t.vid WHERE type='%s'" . $cond . " ORDER BY n.vid DESC"), $count, $element, NULL, $args);
-
+  
   while ($row = db_fetch_object($result)) {
     $nodes[] = $row;
   }
-
+  
   return $nodes;
 }
 
+/**
+ * Retrieve a list of outstanding tasks.
+ *
+ * @param limit
+ *   The amount of items to return.
+ * @return
+ *   An associative array containing task nodes, indexed by node id.
+ */
+function _hosting_get_new_tasks($limit = 20) {
+  $return = array();
+  $result = db_query("SELECT t.nid FROM {hosting_task} t INNER JOIN {node} n ON t.vid = n.vid WHERE t.task_status = %d GROUP BY t.rid ORDER BY n.changed, n.nid ASC LIMIT %d", 0, $limit);
+  while ($node = db_fetch_object($result)) {
+    $return[$node->nid] =  node_load($node->nid);
+  }
+  return $return;
+}
 
 /**
  * @name Error status definitions
@@ -956,7 +983,7 @@ function hosting_task_queue_block() {
   foreach ($nodes as $node) {
     $row = array();
     $row['type'] = array(
-      'data' => drupal_ucfirst(str_replace('_', ' ', $node->task_type)) . ' ' . _hosting_node_link($node->rid),
+      'data' => drupal_ucfirst(str_replace(array('_', '-'), ' ', $node->task_type)) . ' ' . _hosting_node_link($node->rid),
       'class' => 'hosting-status'
     );
 
@@ -1007,7 +1034,7 @@ function hosting_task_table($node) {
     else {
       $actions['run'] = _hosting_task_button(t('Run'), sprintf("node/%d/%s_%s", $node->nid, $node->type, $task), $info['description'], 'hosting-button-run', $info['task_permitted'], $info['dialog']);
     }
-
+     
     $actions['log'] = _hosting_task_button(t('View'), 'node/' . $info['nid'], t("Display the task log"), 'hosting-button-log', isset($info['nid']) &&  user_access('access task logs'), TRUE, FALSE);
      $row['actions'] = array(
         'data' => implode('', $actions),
@@ -1049,17 +1076,6 @@ function _hosting_task_button($title, $link, $description, $class = '', $status
 }
 
 /**
- * A list of recent tasks, used to be embeded in site and platform nodes
- *
- * @deprecated
- * @see hosting_task_list_table()
- * @see hosting_task_list()
- */
-function hosting_task_list_embedded($filter_by = null, $filter_value = null) {
-  return _hosting_task_list($filter_by, $filter_value, 5, 10, 'task_type', array('created'));
-}
-
-/**
  * Theme a task list
  */
 function _hosting_task_list($filter_by, $filter_value, $count = 5, $element = 0, $field = 'title', $skip = array(), $pager = TRUE) {
@@ -1119,8 +1135,7 @@ function _hosting_task_list($filter_by, $filter_value, $count = 5, $element = 0,
 function hosting_task_fetch_tasks($rid) {
   $node = node_load($rid);
 
-  $tasks = hosting_available_tasks($node->type);
-  $result = db_query("SELECT n.nid, t.task_type, t.task_status FROM {node} n LEFT JOIN {hosting_task} t ON n.vid=t.vid
+  $result = db_query("SELECT n.nid, t.task_type, t.task_status FROM {node} n INNER JOIN {hosting_task} t ON n.vid = t.vid 
     WHERE n.type = 'task' AND t.rid = %d
     ORDER BY t.task_status ASC, n.changed DESC", $rid);
 
@@ -1158,7 +1173,7 @@ function hosting_task_status_class($status = null) {
   $class = null;
   if (!is_null($status)) {
     switch($status) {
-      case HOSTING_TASK_SUCCESS :
+      case HOSTING_TASK_SUCCESS : 
         $class = 'hosting-success';
         break;
       case HOSTING_TASK_ERROR :
@@ -1181,7 +1196,7 @@ function hosting_task_status_class($status = null) {
  */
 function hosting_task_views_api() {
   return array(
-    'api' => 2,
+    'api' => 2, 
     'path' => drupal_get_path('module', 'hosting_task'),
   );
 }
diff --git a/modules/hosting/web_server/ssl/hosting_ssl.nodeapi.inc b/modules/hosting/web_server/ssl/hosting_ssl.nodeapi.inc
index b00e62d..2cafe63 100644
--- a/modules/hosting/web_server/ssl/hosting_ssl.nodeapi.inc
+++ b/modules/hosting/web_server/ssl/hosting_ssl.nodeapi.inc
@@ -72,7 +72,7 @@ function hosting_ssl_hosting_site_options_alter(&$return, $node) {
     if (sizeof($return['ssl_key']) == 1) {
       $node->ssl_key = HOSTING_SSL_CUSTOM_KEY;
     }
-
+    
     // the user has chosen to enter a new key
     if ($node->ssl_key == HOSTING_SSL_CUSTOM_KEY) {
       // default the new key to the site's domain name, after filtering.
@@ -136,7 +136,7 @@ function hosting_ssl_status_options($status = null) {
     return $options[$status];
   }
   return $options;
-
+  
 }
 
 
@@ -212,7 +212,7 @@ function hosting_ssl_nodeapi_site_update($node) {
 
 function hosting_ssl_nodeapi_site_load($node) {
   $result = db_query("SELECT ssl_enabled, ssl_key FROM {hosting_ssl_site} WHERE vid=%d", $node->vid);
-  $additions = db_fetch_array($result);
+  $additions = db_fetch_array($result); 
   return $additions;
 }
 
diff --git a/themes/eldir/eldir.info b/themes/eldir/eldir.info
index 093d6a3..8d6507b 100644
--- a/themes/eldir/eldir.info
+++ b/themes/eldir/eldir.info
@@ -7,6 +7,8 @@ engine = phptemplate
 stylesheets[all][] = style.css
 regions[left] = Left sidebar
 regions[right] = Right sidebar
+regions[content_top] = Content top
 regions[content] = Content
+regions[content_bottom] = Content bottom
 regions[header] = Header
 regions[footer] = Footer
diff --git a/themes/eldir/page.tpl.php b/themes/eldir/page.tpl.php
index 7760438..678690c 100644
--- a/themes/eldir/page.tpl.php
+++ b/themes/eldir/page.tpl.php
@@ -41,7 +41,9 @@
       <div class='page-content'>
         <?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>
         <?php if ($help): print $help; endif; ?>
+        <?php print $content_top ?>
         <?php print $content ?>
+        <?php print $content_bottom ?>
         <?php print $feed_icons ?>
       </div>
     </div><!-- /main -->
diff --git a/themes/eldir/style.css b/themes/eldir/style.css
index ad9c256..ff1b380 100644
--- a/themes/eldir/style.css
+++ b/themes/eldir/style.css
@@ -812,7 +812,7 @@ table.hosting-table th {
       padding-bottom:5px;
       }
 
-  body.aegir #page div.node div.content div.form-item label {
+  .hosting-info-list div.form-item label {
     position:absolute;
     left:0px;
     width:95px;
