diff --git a/contrib/content.inc b/contrib/content.inc
index bec5ca7..3b8531e 100644
--- a/contrib/content.inc
+++ b/contrib/content.inc
@@ -89,9 +89,9 @@ function update_api_content_import(&$ret, $content, $type = NULL) {
     else {
       // Let's try to enable the content_copy module.
       module_enable(array('content_copy'));
-  
+
       $ret[] = _update_api_content_import($content, $type);
-  
+
       // Now disable content_copy.
       module_disable(array('content_copy'));
     }
@@ -108,7 +108,7 @@ function _update_api_content_import($content, $type) {
   if (function_exists('content_copy_import_form')) {
     $form_state['values']['type_name'] = $type;
     $form_state['values']['macro'] = '$content = '. var_export($content, TRUE) .';';
-  
+
     drupal_execute('content_copy_import_form', $form_state);
     return array('success' => TRUE, 'query' => t('Importing of content type %type was attempted.', array('%type' => $content['type']['type'])));
   }
diff --git a/contrib/features.inc b/contrib/features.inc
index 066efd2..a36e70f 100644
--- a/contrib/features.inc
+++ b/contrib/features.inc
@@ -6,7 +6,7 @@
  */
 
 /**
- * Install features 
+ * Install features
  *
  * @param $ret
  *   An array with the results of the hook_update_N() call.
diff --git a/contrib/i18n.inc b/contrib/i18n.inc
new file mode 100644
index 0000000..2e2547f
--- /dev/null
+++ b/contrib/i18n.inc
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * Sets a variable for all languages
+ *
+ * @param $ret
+ * @param $name
+ * @param $value
+ */
+function update_api_i18n_variable_set(&$ret, $name, $values, $langcode = NULL) {
+  if (!$langcode) {
+    foreach (language_list() as $lang) {
+      i18n_variable_set($name, $values[$lang->language], $lang->language);
+    }
+  }
+  else {
+    i18n_variable_set($name, $values, $langcode);
+  }
+
+  $message = t('i18n variable @var set', array('@var' => $name));
+  $ret[] = array('success' => true, 'query' => $message);
+}
+
+/**
+ * Resaves primary menu links and generates translation
+ * @return unknown_type
+ */
+function _update_api_regenerate_primary_menulinks_translations(){
+  $result = db_query("SELECT mlid FROM {menu_links} WHERE menu_name = '%s'", 'primary-links');
+  $item_tmp = array();
+  $form_state = array();
+
+  while ($row = db_fetch_object($result)) {
+    unset($item);
+
+    $item = menu_link_load($row->mlid);
+
+    $item_tmp['link_path'] = $item["link_path"];
+    $item_tmp['mlid'] = $item["mlid"];
+    $item_tmp['module'] = $item["module"];
+    $item_tmp['has_children'] = $item["has_children"];
+    $item_tmp['customized'] = $item["customized"];
+    $item_tmp['link_title'] = $item["title"];
+    $item_tmp['original_item'] = $item;
+    $item_tmp['description'] = $item["description"];
+    $item_tmp['expanded'] = $item["expanded"];
+    $item_tmp['parent'] = 0;
+    $item_tmp['weight'] = $item["weight"];
+    $item_tmp['language'] = '';
+    $item_tmp['hidden'] = $item["hidden"];
+    $item_tmp['plid'] = $item["plid"];
+    $item_tmp['menu_name'] = $item["menu_name"];
+
+    menu_link_save($item_tmp);
+    _i18nmenu_update_item($item_tmp);
+  }
+}
diff --git a/contrib/imagecache.inc b/contrib/imagecache.inc
index 612a97b..0fd88c0 100644
--- a/contrib/imagecache.inc
+++ b/contrib/imagecache.inc
@@ -11,7 +11,7 @@
  * @param $ret
  *   An array with the results of the hook_update_N() call.
  * @param $presets
- *   An array of preset names of presets to flush. If NULL, all presets will be 
+ *   An array of preset names of presets to flush. If NULL, all presets will be
  *   flushed.
  */
 function update_api_imagecache_presets_flush(&$ret, $presets = NULL) {
@@ -20,7 +20,7 @@ function update_api_imagecache_presets_flush(&$ret, $presets = NULL) {
   }
 
   foreach ($presets as $preset) {
-    // Make sure we have an imagecache preset array. We have to ensure it's an array 
+    // Make sure we have an imagecache preset array. We have to ensure it's an array
     // first, b/c isset($preset['presetname']) returns TRUE for strings.
     if (is_array($preset) && isset($preset['presetname'])) {
       $name = $preset['presetname'];
@@ -39,4 +39,4 @@ function update_api_imagecache_presets_flush(&$ret, $presets = NULL) {
       $ret[] = array('success' => FALSE, 'query' => t('Unable to find the <strong>@name</strong> imagecache preset.<br /> @vardump', array('@name' => $name, '@vardump' => var_export($preset, TRUE))));
     }
   }
-}
\ No newline at end of file
+}
diff --git a/contrib/shib_auth.inc b/contrib/shib_auth.inc
new file mode 100644
index 0000000..ff3fb50
--- /dev/null
+++ b/contrib/shib_auth.inc
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * Set Shib auth vars
+ * @roles array with roles array('rid' => 'name')
+ */
+function update_api_set_shib_auth_vars(&$ret, $field, $regex, $roles) {
+  db_query("DELETE FROM {shib_auth} WHERE regexpression = $regex");
+  $ret[] = update_sql("INSERT INTO {shib_auth} (field, regexpression, role) VALUES ('".urlencode($field)."', '".urlencode($regex)."', '".urlencode(serialize($roles)).")");
+}
diff --git a/core/block.inc b/core/block.inc
new file mode 100644
index 0000000..feda154
--- /dev/null
+++ b/core/block.inc
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * Update a block
+ *
+ * @param $ret
+ * @param $t_key theme key ofr which theme you want to set the blocks
+ * @param $title
+ * @param $region
+ * @param $status
+ * @param $module
+ * @param $delta
+ * @return unknown_type
+ */
+function update_api_set_block(&$ret, $t_key, $title, $region, $status, $module, $delta) {
+  global $theme_key;
+  $theme_key = $t_key;
+  _block_rehash();
+
+  $ret[] = update_sql("UPDATE {blocks} SET title = '$title', region = '$region', status = $status WHERE module = '$module' AND delta = '$delta'");
+}
diff --git a/core/filter.inc b/core/filter.inc
index d1d157a..23e7d88 100644
--- a/core/filter.inc
+++ b/core/filter.inc
@@ -168,4 +168,4 @@ function _update_api_input_format_defaults() {
     'filters' => NULL,
     'wysiwyg' => NULL,
   );
-}
\ No newline at end of file
+}
diff --git a/core/locale.inc b/core/locale.inc
new file mode 100644
index 0000000..3fede68
--- /dev/null
+++ b/core/locale.inc
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * Import locale file
+ */
+function update_api_import_locale(&$ret, $path, $name) {
+  include_once update_api_get_basepath() . '/includes/locale.inc';
+
+  //Build in interface
+  $ob = _update_api_create_file_object($path, $name);
+  _locale_import_po($ob, 'fr', LOCALE_IMPORT_OVERWRITE, 'default');
+  $ret[] = array('success' => true, 'query' => t('Locale file @path installed', array('@path' => $path)));
+}
+
+function update_api_import_locale_primary_links_menu(&$ret, $path, $name) {
+  i18nstrings_refresh_group('menu', TRUE);
+  update_api_import_locale($ret, $path, $name);
+  _update_api_regenerate_primary_menulinks_translations();
+}
+
+function _update_api_create_file_object($path, $name) {
+  $file = new stdClass();
+  $file->filepath = $path;
+  $file->filename = $name;
+
+  return $file;
+}
diff --git a/core/node.inc b/core/node.inc
index 13d34ab..1b32e35 100644
--- a/core/node.inc
+++ b/core/node.inc
@@ -11,10 +11,10 @@
  * @param $ret
  *   An array with the results of the hook_update_N() call.
  * @param $types
- *   An array of node types to be updated, keyed by the type name.  The value 
+ *   An array of node types to be updated, keyed by the type name.  The value
  *   should be an array of fields to be updated for this node type.
  */
-function update_api_node_type(&$ret, $types) {
+function update_api_nodetype(&$ret, $types) {
   foreach($types as $name => $fields) {
     foreach($fields as $field_name => $value) {
       if (is_string($value)) {
@@ -25,4 +25,38 @@ function update_api_node_type(&$ret, $types) {
       }
     }
   }
-}
\ No newline at end of file
+}
+
+/**
+ * Delete nodes by type
+ * @param $ret
+ * @param $type
+ * @return unknown_type
+ */
+function update_api_delete_nodes_by_type($ret, $type) {
+  $result = db_query("SELECT nid FROM {node} WHERE type = '$type'");
+  while ($row = db_fetch_object($result)) {
+    node_delete($row->nid);
+    $message = t('Node @nid of @type was deleted', array('@nid' => $row->nid, '@type' => $type));
+    $ret[] = array('success' => TRUE, 'query' => $message);
+  }
+}
+
+/**
+ * Create multilingual node
+ * @langs all languages set default lang first
+ */
+function update_api_multiling_node(&$ret, $nodes) {
+  foreach ($nodes as $lang => $node) {
+    if (!$first) {
+      //set tnid
+      $status = db_fetch_object(db_query("SHOW TABLE STATUS WHERE Name='node'"));
+      $tnid = $status->Auto_increment;
+      $first = true;
+    }
+
+    $node->tnid = $tnid;
+    $node->language = $lang;
+    node_save($node);
+  }
+}
diff --git a/core/system.inc b/core/system.inc
index f4e9de7..24849b5 100644
--- a/core/system.inc
+++ b/core/system.inc
@@ -64,7 +64,7 @@ function update_api_variables_del(&$ret, $vars = array()) {
  * @param $modules
  *   An array of modules to disable.
  * @param $error
- *   Boolean to report modules that failed to disable.  Defaults 
+ *   Boolean to report modules that failed to disable.  Defaults
  *   to TRUE.
  */
 function update_api_modules_disable(&$ret, $modules = array(), $error = TRUE) {
@@ -101,14 +101,14 @@ function update_api_modules_disable(&$ret, $modules = array(), $error = TRUE) {
  * @param $modules
  *   An array of modules to disable and uninstall.
  */
-function update_api_modules_uninstall(&$ret, $modules = array()) {
+function update_api_modules_uninstall(&$ret, $modules = array(), $error = TRUE) {
   // Make sure the install API is available.
   include_once './includes/install.inc';
 
   $uninstalled = $failed = array();
 
   // Disable the modules, just to be safe.
-  update_api_modules_disable($ret, $modules, FALSE);
+  update_api_modules_disable($ret, $modules, $error);
 
   foreach($modules as $name) {
     if ($module = _update_api_module_uninstallable($name)) {
@@ -149,10 +149,10 @@ function _update_api_module_uninstallable($name) {
     // Pull all disabled modules from the system table.
     $disabled_modules = db_query("SELECT name, filename, info FROM {system} WHERE type = 'module' AND status = 0 AND schema_version > %d ORDER BY name", SCHEMA_UNINSTALLED);
     while ($module = db_fetch_object($disabled_modules)) {
-  
+
       // Grab the module info
       $info = unserialize($module->info);
-  
+
       // Load the .install file, and check for an uninstall hook.
       // If the hook exists, the module can be uninstalled.
       module_load_install($module->name);
@@ -163,4 +163,11 @@ function _update_api_module_uninstallable($name) {
   }
 
   return isset($uninstallables[$name]) ? $uninstallables[$name] : FALSE;
-}
\ No newline at end of file
+}
+
+/**
+ * Set a module weight
+ */
+function update_api_set_module_weight(&$ret, $weight, $module) {
+  $ret[] = update_sql("UPDATE {system} SET weight = " . $weight . " WHERE name  = '" . $module . "'");
+}
diff --git a/core/theme.inc b/core/theme.inc
new file mode 100644
index 0000000..f69656c
--- /dev/null
+++ b/core/theme.inc
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * Set the new theme
+ * @param $theme
+ * @param $settings
+ */
+function update_api_set_theme($theme, $settings) {
+  cache_clear_all();
+  $ret[] = update_sql("UPDATE {system} SET status = 0 WHERE type = 'theme'");
+  system_initialize_theme_blocks($theme);
+  drupal_rebuild_theme_registry();
+  $ret[] = update_sql("UPDATE {system} SET status = 1 WHERE type = 'theme' and name = '$theme'");
+  variable_set('theme_default', $theme);
+  $ret[] = update_sql("DELETE FROM {variable} WHERE name = 'theme_".$theme."_settings'");
+  $ret[] = update_sql("INSERT INTO variable (name, value) VALUES ('theme_".$theme."_settings', '$settings')");
+  list_themes(TRUE);
+  menu_rebuild();
+  drupal_rebuild_theme_registry();
+  $message = t('@theme installed', array('@theme' => $message));
+  $ret[] = array('success' => true, 'query' => $message);
+}
diff --git a/core/user.inc b/core/user.inc
index 401366d..5cb77d4 100644
--- a/core/user.inc
+++ b/core/user.inc
@@ -4,8 +4,8 @@
  * @file
  * All User Module related update functions.
  *
- * Most permissions related functions were quickly borrowed from the Permissions 
- * API Module, found at http://drupal.org/project/permissions_api.  @todo These 
+ * Most permissions related functions were quickly borrowed from the Permissions
+ * API Module, found at http://drupal.org/project/permissions_api.  @todo These
  * permissions functions definitely need some love.
  */
 
@@ -77,10 +77,10 @@ function update_api_permissions_revoke(&$ret, $role_name, $new_permissions) {
       foreach($new_permissions as $permission){
         $index = array_search($permission, $permissions);
         if($index >= 0){
-          unset($permissions[$index]);       
+          unset($permissions[$index]);
         }
       }
-      
+
       // rebuild the permission string
       $updated_permissions = implode(', ', $permissions);
       $ret[] = update_sql("UPDATE {permission} SET perm = '$update_permissions' WHERE rid = {$role->rid}");
@@ -110,3 +110,16 @@ function update_api_get_permissions_for_role($rid){
   }
   return $permissions;
 }
+
+/**
+ * Delete role
+ */
+function update_api_delete_role(&$ret, $rid) {
+  if ($rid > 0) {
+    $ret[] = update_sql("DELETE FROM {role} WHERE rid = $rid");
+    $ret[] = update_sql("DELETE FROM {permission} WHERE rid = $rid");
+    // Update the users who have this role set:
+    $ret[] = update_sql("DELETE FROM {users_roles} WHERE rid = $rid");
+    $ret[] = update_sql('DELETE FROM {blocks_roles} WHERE rid = %d', $rid);
+  }
+}
diff --git a/update_api.module b/update_api.module
index 19412b3..ec5d2c3 100644
--- a/update_api.module
+++ b/update_api.module
@@ -5,7 +5,7 @@
  * Update API Module
  *
  * Provides an API for use in hook_update_N() calls.  Each hook_update_N() function
- * returns an array with the results of the calls to update_sql().  Every function 
+ * returns an array with the results of the calls to update_sql().  Every function
  * in update_api works in much the same way, passing the $ret array as an argument
  * and reporting each update and error encountered.
  *
@@ -24,7 +24,7 @@
  * Includes the requested file.
  *
  * @param $package
- *   The module or package file name to include. 
+ *   The module or package file name to include.
  */
 function update_api_include($package) {
   static $included = array();
@@ -44,4 +44,52 @@ function update_api_include($package) {
   }
 
   $included[$package] = TRUE;
-}
\ No newline at end of file
+}
+
+/**
+ * Returns list of support modules
+ */
+function update_api_info() {
+  $packages = array(
+    'block',
+    'locale',
+    'node',
+    'system',
+    'user',
+    'content',
+    'features',
+    'i18n',
+    'imagecache',
+    'shib_auth'
+  );
+
+  return $packages;
+}
+
+/**
+ * Loads the entire api
+ */
+function update_api_load_api() {
+  $packages = update_api_info();
+  foreach ($packages as $package) {
+    update_api_include($package);
+  }
+}
+
+/**
+ * Constructs base path
+ */
+function update_api_get_basepath() {
+  $dir = dirname(__FILE__);
+  $bdir = explode('/', $dir);
+  foreach ($bdir as $piece) {
+    if ($piece == 'sites') {
+      break;
+    }
+    $path_out[] = $piece;
+  }
+
+  $path = implode('/', $path_out);
+
+  return $path;
+}
