diff --git modules/aggregator/aggregator.install modules/aggregator/aggregator.install
index 80d7718..e65c01c 100644
--- modules/aggregator/aggregator.install
+++ modules/aggregator/aggregator.install
@@ -3,34 +3,10 @@
 
 /**
  * @file
- * Install, update and uninstall functions for the aggregator module.
+ * Installation functions for Aggregator module.
  */
 
 /**
- * Implementation of hook_install().
- */
-function aggregator_install() {
-  // Create tables.
-  drupal_install_schema('aggregator');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function aggregator_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('aggregator');
-
-  variable_del('aggregator_allowed_html_tags');
-  variable_del('aggregator_summary_items');
-  variable_del('aggregator_clear');
-  variable_del('aggregator_category_selector');
-  variable_del('aggregator_fetcher');
-  variable_del('aggregator_parser');
-  variable_del('aggregator_processors');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function aggregator_schema() {
@@ -264,6 +240,33 @@ function aggregator_schema() {
 }
 
 /**
+ * Implementation of hook_install().
+ */
+function aggregator_install() {
+  drupal_install_schema('aggregator');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function aggregator_uninstall() {
+  drupal_uninstall_schema('aggregator');
+
+  variable_del('aggregator_allowed_html_tags');
+  variable_del('aggregator_summary_items');
+  variable_del('aggregator_clear');
+  variable_del('aggregator_category_selector');
+  variable_del('aggregator_fetcher');
+  variable_del('aggregator_parser');
+  variable_del('aggregator_processors');
+}
+
+/**
+ * @ingroup updates-6.x-to-7.x
+ * @{
+ */
+
+/**
  * Add hash column to aggregator_feed table.
  */
 function aggregator_update_7000() {
@@ -271,3 +274,8 @@ function aggregator_update_7000() {
   db_add_field($ret, 'aggregator_feed', 'hash', array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''));
   return $ret;
 }
+
+/**
+ * @} End of "ingroup updates-6.x-to-7.x"
+ */
+
diff --git modules/blogapi/blogapi.install modules/blogapi/blogapi.install
index 3a60278..64d85d1 100644
--- modules/blogapi/blogapi.install
+++ modules/blogapi/blogapi.install
@@ -7,23 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function blogapi_install() {
-  // Create tables.
-  drupal_install_schema('blogapi');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function blogapi_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('blogapi');
-}
-
-
-/**
  * Implementation of hook_schema().
  */
 function blogapi_schema() {
@@ -66,6 +49,22 @@ function blogapi_schema() {
 }
 
 /**
+ * Implementation of hook_install().
+ */
+function blogapi_install() {
+  // Create tables.
+  drupal_install_schema('blogapi');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function blogapi_uninstall() {
+  // Remove tables.
+  drupal_uninstall_schema('blogapi');
+}
+
+/**
  * @defgroup updates-5.x-to-6.x Blog API updates from 5.x to 6.x
  * @{
  */
diff --git modules/book/book.install modules/book/book.install
index 807df81..20f7f5d 100644
--- modules/book/book.install
+++ modules/book/book.install
@@ -7,6 +7,47 @@
  */
 
 /**
+ * Implementation of hook_schema().
+ */
+function book_schema() {
+  $schema['book'] = array(
+  'description' => 'Stores book outline information. Uniquely connects each node in the outline to a link in {menu_links}',
+    'fields' => array(
+      'mlid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => "The book page's {menu_links}.mlid.",
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => "The book page's {node}.nid.",
+      ),
+      'bid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => "The book ID is the {book}.nid of the top-level page.",
+      ),
+    ),
+    'primary key' => array('mlid'),
+    'unique keys' => array(
+      'nid' => array('nid'),
+    ),
+    'indexes' => array(
+      'bid' => array('bid'),
+    ),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function book_install() {
@@ -249,45 +290,4 @@ function book_update_6000() {
   }
 
   return $ret;
-}
-
-/**
- * Implementation of hook_schema().
- */
-function book_schema() {
-  $schema['book'] = array(
-  'description' => 'Stores book outline information. Uniquely connects each node in the outline to a link in {menu_links}',
-    'fields' => array(
-      'mlid' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => "The book page's {menu_links}.mlid.",
-      ),
-      'nid' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => "The book page's {node}.nid.",
-      ),
-      'bid' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => "The book ID is the {book}.nid of the top-level page.",
-      ),
-    ),
-    'primary key' => array('mlid'),
-    'unique keys' => array(
-      'nid' => array('nid'),
-    ),
-    'indexes' => array(
-      'bid' => array('bid'),
-    ),
-  );
-
-  return $schema;
-}
+}
\ No newline at end of file
diff --git modules/comment/comment.install modules/comment/comment.install
index a7bbd3a..e1138f6 100644
--- modules/comment/comment.install
+++ modules/comment/comment.install
@@ -7,6 +7,156 @@
  */
 
 /**
+ * Implementation of hook_schema().
+ */
+function comment_schema() {
+  $schema['comment'] = array(
+    'description' => 'Stores comments and associated data.',
+    'fields' => array(
+      'cid' => array(
+        'type' => 'serial',
+        'not null' => TRUE,
+        'description' => 'Primary Key: Unique comment ID.',
+      ),
+      'pid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The {comment}.cid to which this comment is a reply. If set to 0, this comment is not a reply to an existing comment.',
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The {node}.nid to which this comment is a reply.',
+      ),
+      'uid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The {users}.uid who authored the comment. If set to 0, this comment was created by an anonymous user.',
+      ),
+      'subject' => array(
+        'type' => 'varchar',
+        'length' => 64,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'The comment title.',
+      ),
+      'comment' => array(
+        'type' => 'text',
+        'not null' => TRUE,
+        'size' => 'big',
+        'description' => 'The comment body.',
+      ),
+      'hostname' => array(
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => "The author's host name.",
+      ),
+      'timestamp' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The time that the comment was created, or last edited by its author, as a Unix timestamp.',
+      ),
+      'status' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 1,
+        'size' => 'tiny',
+        'description' => 'The published status of a comment. (0 = Not Published, 1 = Published)',
+      ),
+      'format' => array(
+        'type' => 'int',
+        'size' => 'small',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The {filter_format}.format of the comment body.',
+      ),
+      'thread' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'description' => "The vancode representation of the comment's place in a thread.",
+      ),
+      'name' => array(
+        'type' => 'varchar',
+        'length' => 60,
+        'not null' => FALSE,
+        'description' => "The comment author's name. Uses {users}.name if the user is logged in, otherwise uses the value typed into the comment form.",
+      ),
+      'mail' => array(
+        'type' => 'varchar',
+        'length' => 64,
+        'not null' => FALSE,
+        'description' => "The comment author's e-mail address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on.",
+      ),
+      'homepage' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => FALSE,
+        'description' => "The comment author's home page address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on.",
+      )
+    ),
+    'indexes' => array(
+      'pid' => array('pid'),
+      'nid' => array('nid'),
+      // This index is probably unused.
+      'status' => array('status'),
+    ),
+    'primary key' => array('cid'),
+  );
+
+  $schema['node_comment_statistics'] = array(
+    'description' => 'Maintains statistics of node and comments posts to show "new" and "updated" flags.',
+    'fields' => array(
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The {node}.nid for which the statistics are compiled.',
+      ),
+      'last_comment_timestamp' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The Unix timestamp of the last comment that was posted within this node, from {comment}.timestamp.',
+      ),
+      'last_comment_name' => array(
+        'type' => 'varchar',
+        'length' => 60,
+        'not null' => FALSE,
+        'description' => 'The name of the latest author to post a comment on this node, from {comment}.name.',
+      ),
+      'last_comment_uid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The user ID of the latest author to post a comment on this node, from {comment}.uid.',
+      ),
+      'comment_count' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The total number of comments on this node.',
+      ),
+    ),
+    'primary key' => array('nid'),
+    'indexes' => array(
+      'node_comment_timestamp' => array('last_comment_timestamp'),
+    ),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function comment_install() {
@@ -156,154 +306,4 @@ function comment_update_7002() {
 /**
  * @} End of "defgroup updates-6.x-to-7.x"
  * The next series of updates should start at 8000.
- */
-
-/**
- * Implementation of hook_schema().
- */
-function comment_schema() {
-  $schema['comment'] = array(
-    'description' => 'Stores comments and associated data.',
-    'fields' => array(
-      'cid' => array(
-        'type' => 'serial',
-        'not null' => TRUE,
-        'description' => 'Primary Key: Unique comment ID.',
-      ),
-      'pid' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The {comment}.cid to which this comment is a reply. If set to 0, this comment is not a reply to an existing comment.',
-      ),
-      'nid' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The {node}.nid to which this comment is a reply.',
-      ),
-      'uid' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The {users}.uid who authored the comment. If set to 0, this comment was created by an anonymous user.',
-      ),
-      'subject' => array(
-        'type' => 'varchar',
-        'length' => 64,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'The comment title.',
-      ),
-      'comment' => array(
-        'type' => 'text',
-        'not null' => TRUE,
-        'size' => 'big',
-        'description' => 'The comment body.',
-      ),
-      'hostname' => array(
-        'type' => 'varchar',
-        'length' => 128,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => "The author's host name.",
-      ),
-      'timestamp' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The time that the comment was created, or last edited by its author, as a Unix timestamp.',
-      ),
-      'status' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 1,
-        'size' => 'tiny',
-        'description' => 'The published status of a comment. (0 = Not Published, 1 = Published)',
-      ),
-      'format' => array(
-        'type' => 'int',
-        'size' => 'small',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The {filter_format}.format of the comment body.',
-      ),
-      'thread' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'description' => "The vancode representation of the comment's place in a thread.",
-      ),
-      'name' => array(
-        'type' => 'varchar',
-        'length' => 60,
-        'not null' => FALSE,
-        'description' => "The comment author's name. Uses {users}.name if the user is logged in, otherwise uses the value typed into the comment form.",
-      ),
-      'mail' => array(
-        'type' => 'varchar',
-        'length' => 64,
-        'not null' => FALSE,
-        'description' => "The comment author's e-mail address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on.",
-      ),
-      'homepage' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => FALSE,
-        'description' => "The comment author's home page address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on.",
-      )
-    ),
-    'indexes' => array(
-      'pid' => array('pid'),
-      'nid' => array('nid'),
-      // This index is probably unused.
-      'status' => array('status'),
-    ),
-    'primary key' => array('cid'),
-  );
-
-  $schema['node_comment_statistics'] = array(
-    'description' => 'Maintains statistics of node and comments posts to show "new" and "updated" flags.',
-    'fields' => array(
-      'nid' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The {node}.nid for which the statistics are compiled.',
-      ),
-      'last_comment_timestamp' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The Unix timestamp of the last comment that was posted within this node, from {comment}.timestamp.',
-      ),
-      'last_comment_name' => array(
-        'type' => 'varchar',
-        'length' => 60,
-        'not null' => FALSE,
-        'description' => 'The name of the latest author to post a comment on this node, from {comment}.name.',
-      ),
-      'last_comment_uid' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The user ID of the latest author to post a comment on this node, from {comment}.uid.',
-      ),
-      'comment_count' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The total number of comments on this node.',
-      ),
-    ),
-    'primary key' => array('nid'),
-    'indexes' => array(
-      'node_comment_timestamp' => array('last_comment_timestamp'),
-    ),
-  );
-
-  return $schema;
-}
+ */
\ No newline at end of file
diff --git modules/contact/contact.install modules/contact/contact.install
index b58d0dc..663ec2a 100644
--- modules/contact/contact.install
+++ modules/contact/contact.install
@@ -7,26 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function contact_install() {
-  // Create tables.
-  drupal_install_schema('contact');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function contact_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('contact');
-
-  variable_del('contact_default_status');
-  variable_del('contact_form_information');
-  variable_del('contact_hourly_threshold');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function contact_schema() {
@@ -84,3 +64,23 @@ function contact_schema() {
 
   return $schema;
 }
+
+/**
+ * Implementation of hook_install().
+ */
+function contact_install() {
+  // Create tables.
+  drupal_install_schema('contact');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function contact_uninstall() {
+  // Remove tables.
+  drupal_uninstall_schema('contact');
+
+  variable_del('contact_default_status');
+  variable_del('contact_form_information');
+  variable_del('contact_hourly_threshold');
+}
\ No newline at end of file
diff --git modules/dblog/dblog.install modules/dblog/dblog.install
index 9c9abe0..0274aa6 100644
--- modules/dblog/dblog.install
+++ modules/dblog/dblog.install
@@ -7,22 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function dblog_install() {
-  // Create tables.
-  drupal_install_schema('dblog');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function dblog_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('dblog');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function dblog_schema() {
@@ -109,6 +93,22 @@ function dblog_schema() {
 }
 
 /**
+ * Implementation of hook_install().
+ */
+function dblog_install() {
+  // Create tables.
+  drupal_install_schema('dblog');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function dblog_uninstall() {
+  // Remove tables.
+  drupal_uninstall_schema('dblog');
+}
+
+/**
  * Allow NULL values for links and longer referers.
  */
 function dblog_update_7001() {
diff --git modules/field/field.install modules/field/field.install
index b5999e4..a6ddf85 100644
--- modules/field/field.install
+++ modules/field/field.install
@@ -7,13 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function field_install() {
-  drupal_install_schema('field');
-}
-
-/**
  * Implementation of hook_schema.
  */
 function field_schema() {
@@ -144,3 +137,10 @@ function field_schema() {
 
   return $schema;
 }
+
+/**
+ * Implementation of hook_install().
+ */
+function field_install() {
+  drupal_install_schema('field');
+}
\ No newline at end of file
diff --git modules/field/modules/field_sql_storage/field_sql_storage.install modules/field/modules/field_sql_storage/field_sql_storage.install
index 2db55fd..c35470c 100644
--- modules/field/modules/field_sql_storage/field_sql_storage.install
+++ modules/field/modules/field_sql_storage/field_sql_storage.install
@@ -7,20 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function field_sql_storage_install() {
-  drupal_install_schema('field_sql_storage');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function field_sql_storage_uninstall() {
-  drupal_uninstall_schema('field_sql_storage');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function field_sql_storage_schema() {
@@ -56,3 +42,17 @@ function field_sql_storage_schema() {
   }
   return $schema;
 }
+
+/**
+ * Implementation of hook_install().
+ */
+function field_sql_storage_install() {
+  drupal_install_schema('field_sql_storage');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function field_sql_storage_uninstall() {
+  drupal_uninstall_schema('field_sql_storage');
+}
\ No newline at end of file
diff --git modules/forum/forum.install modules/forum/forum.install
index 941a705..2406293 100644
--- modules/forum/forum.install
+++ modules/forum/forum.install
@@ -7,65 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function forum_install() {
-  // Create tables.
-  drupal_install_schema('forum');
-  // Set the weight of the forum.module to 1 so it is loaded after the taxonomy.module.
-  db_query("UPDATE {system} SET weight = 1 WHERE name = 'forum'");
-}
-
-function forum_enable() {
-  if ($vocabulary = taxonomy_vocabulary_load(variable_get('forum_nav_vocabulary', 0))) {
-    // Existing install. Add back forum node type, if the forums
-    // vocabulary still exists. Keep all other node types intact there.
-    $vocabulary->nodes['forum'] = 1;
-    taxonomy_vocabulary_save($vocabulary);
-  }
-  else {
-    // Create the forum vocabulary if it does not exist. Assign the vocabulary
-    // a low weight so it will appear first in forum topic create and edit
-    // forms.
-    $edit = array(
-      'name' => t('Forums'),
-      'multiple' => 0,
-      'required' => 0,
-      'hierarchy' => 1,
-      'relations' => 0,
-      'module' => 'forum',
-      'weight' => -10,
-      'nodes' => array('forum' => 1),
-    );
-    $vocabulary = (object) $edit;
-    taxonomy_vocabulary_save($vocabulary);
-
-    variable_set('forum_nav_vocabulary', $vocabulary->vid);
-  }
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function forum_uninstall() {
-  // Load the dependent Taxonomy module, in case it has been disabled.
-  drupal_load('module', 'taxonomy');
-
-  // Delete the vocabulary.
-  $vid = variable_get('forum_nav_vocabulary', 0);
-  taxonomy_vocabulary_delete($vid);
-
-  db_query('DROP TABLE {forum}');
-  variable_del('forum_containers');
-  variable_del('forum_nav_vocabulary');
-  variable_del('forum_hot_topic');
-  variable_del('forum_per_page');
-  variable_del('forum_order');
-  variable_del('forum_block_num_active');
-  variable_del('forum_block_num_new');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function forum_schema() {
@@ -105,6 +46,65 @@ function forum_schema() {
 }
 
 /**
+ * Implementation of hook_install().
+ */
+function forum_install() {
+  // Create tables.
+  drupal_install_schema('forum');
+  // Set the weight of the forum.module to 1 so it is loaded after the taxonomy.module.
+  db_query("UPDATE {system} SET weight = 1 WHERE name = 'forum'");
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function forum_uninstall() {
+  // Load the dependent Taxonomy module, in case it has been disabled.
+  drupal_load('module', 'taxonomy');
+
+  // Delete the vocabulary.
+  $vid = variable_get('forum_nav_vocabulary', 0);
+  taxonomy_vocabulary_delete($vid);
+
+  db_query('DROP TABLE {forum}');
+  variable_del('forum_containers');
+  variable_del('forum_nav_vocabulary');
+  variable_del('forum_hot_topic');
+  variable_del('forum_per_page');
+  variable_del('forum_order');
+  variable_del('forum_block_num_active');
+  variable_del('forum_block_num_new');
+}
+
+function forum_enable() {
+  if ($vocabulary = taxonomy_vocabulary_load(variable_get('forum_nav_vocabulary', 0))) {
+    // Existing install. Add back forum node type, if the forums
+    // vocabulary still exists. Keep all other node types intact there.
+    $vocabulary->nodes['forum'] = 1;
+    taxonomy_vocabulary_save($vocabulary);
+  }
+  else {
+    // Create the forum vocabulary if it does not exist. Assign the vocabulary
+    // a low weight so it will appear first in forum topic create and edit
+    // forms.
+    $edit = array(
+      'name' => t('Forums'),
+      'multiple' => 0,
+      'required' => 0,
+      'hierarchy' => 1,
+      'relations' => 0,
+      'module' => 'forum',
+      'weight' => -10,
+      'nodes' => array('forum' => 1),
+    );
+    $vocabulary = (object) $edit;
+    taxonomy_vocabulary_save($vocabulary);
+
+    variable_set('forum_nav_vocabulary', $vocabulary->vid);
+  }
+}
+
+/**
  * Create the forum vocabulary if does not exist. Assign the
  * vocabulary a low weight so it will appear first in forum topic
  * create and edit forms. Do not just call forum_enable() because in
diff --git modules/locale/locale.install modules/locale/locale.install
index 7ddb221..c688d6f 100644
--- modules/locale/locale.install
+++ modules/locale/locale.install
@@ -7,6 +7,181 @@
  */
 
 /**
+ * Implementation of hook_schema().
+ */
+function locale_schema() {
+  $schema['languages'] = array(
+    'description' => 'List of all available languages in the system.',
+    'fields' => array(
+      'language' => array(
+        'type' => 'varchar',
+        'length' => 12,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => "Language code, e.g. 'de' or 'en-US'.",
+      ),
+      'name' => array(
+        'type' => 'varchar',
+        'length' => 64,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Language name in English.',
+      ),
+      'native' => array(
+        'type' => 'varchar',
+        'length' => 64,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Native language name.',
+      ),
+      'direction' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'Direction of language (Left-to-Right = 0, Right-to-Left = 1).',
+      ),
+      'enabled' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'Enabled flag (1 = Enabled, 0 = Disabled).',
+      ),
+      'plurals' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'Number of plural indexes in this language.',
+      ),
+      'formula' => array(
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Plural formula in PHP code to evaluate to get plural indexes.',
+      ),
+      'domain' => array(
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Domain to use for this language.',
+      ),
+      'prefix' => array(
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Path prefix to use for this language.',
+      ),
+      'weight' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'Weight, used in lists of languages.',
+      ),
+      'javascript' => array(
+        'type' => 'varchar',
+        'length' => 32,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Location of JavaScript translation file.',
+      ),
+    ),
+    'primary key' => array('language'),
+    'indexes' => array(
+      'list' => array('weight', 'name'),
+    ),
+  );
+
+  $schema['locales_source'] = array(
+    'description' => 'List of English source strings.',
+    'fields' => array(
+      'lid' => array(
+        'type' => 'serial',
+        'not null' => TRUE,
+        'description' => 'Unique identifier of this string.',
+      ),
+      'location' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Drupal path in case of online discovered translations or file path in case of imported strings.',
+      ),
+      'textgroup' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => 'default',
+        'description' => 'A module defined group of translations, see hook_locale().',
+      ),
+      'source' => array(
+        'type' => 'text',
+        'mysql_type' => 'blob',
+        'not null' => TRUE,
+        'description' => 'The original string in English.',
+      ),
+      'version' => array(
+        'type' => 'varchar',
+        'length' => 20,
+        'not null' => TRUE,
+        'default' => 'none',
+        'description' => 'Version of Drupal, where the string was last used (for locales optimization).',
+      ),
+    ),
+    'primary key' => array('lid'),
+    'indexes' => array(
+      'source' => array(array('source', 30)),
+    ),
+  );
+
+  $schema['locales_target'] = array(
+    'description' => 'Stores translated versions of strings.',
+    'fields' => array(
+      'lid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'Source string ID. References {locales_source}.lid.',
+      ),
+      'translation' => array(
+        'type' => 'text',
+        'mysql_type' => 'blob',
+        'not null' => TRUE,
+        'description' => 'Translation string value in this language.',
+      ),
+      'language' => array(
+        'type' => 'varchar',
+        'length' => 12,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Language code. References {languages}.language.',
+      ),
+      'plid' => array(
+        'type' => 'int',
+        'not null' => TRUE, // This should be NULL for no referenced string, not zero.
+        'default' => 0,
+        'description' => 'Parent lid (lid of the previous string in the plural chain) in case of plural strings. References {locales_source}.lid.',
+      ),
+      'plural' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'Plural index number in case of plural strings.',
+      ),
+    ),
+    'primary key' => array('language', 'lid', 'plural'),
+    'indexes' => array(
+      'lid'      => array('lid'),
+      'plid'     => array('plid'),
+      'plural'   => array('plural'),
+    ),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function locale_install() {
@@ -21,6 +196,44 @@ function locale_install() {
 }
 
 /**
+ * Implementation of hook_uninstall().
+ */
+function locale_uninstall() {
+  // Delete all JavaScript translation files.
+  $locale_js_directory = file_create_path(variable_get('locale_js_directory', 'languages'));
+  $files = db_query('SELECT language, javascript FROM {languages}');
+  while ($file = db_fetch_object($files)) {
+    if (!empty($file->javascript)) {
+      file_unmanaged_delete(file_create_path($locale_js_directory . '/' . $file->language . '_' . $file->javascript . '.js'));
+    }
+  }
+  // Delete the JavaScript translations directory if empty.
+  @rmdir($locale_js_directory);
+  
+  // Clear variables.
+  variable_del('language_default');
+  variable_del('language_count');
+  variable_del('language_negotiation');
+  variable_del('javascript_parsed');
+  variable_del('language_content_type_default');
+  variable_del('language_content_type_negotiation');
+  variable_del('locale_cache_strings');
+  variable_del('locale_js_directory');
+  
+  foreach (node_get_types() as $type => $content_type) {
+    $setting = variable_del('language_content_type_' . $type);
+  }
+  
+  // Switch back to English: with a $language->language value different from 'en'
+  // successive calls of t() might result in calling locale(), which in turn might 
+  // try to query the unexisting {locales_source} and {locales_target} tables.
+  drupal_init_language();
+  
+  // Remove tables.
+  drupal_uninstall_schema('locale');
+}
+
+/**
  * @defgroup updates-5.x-to-6.x Locale updates from 5.x to 6.x
  * @{
  */
@@ -208,218 +421,4 @@ function locale_update_6005() {
 
 /**
  * @} End of "defgroup updates-5.x-to-6.x"
- */
-
-/**
- * Implementation of hook_uninstall().
- */
-function locale_uninstall() {
-  // Delete all JavaScript translation files.
-  $locale_js_directory = file_create_path(variable_get('locale_js_directory', 'languages'));
-  $files = db_query('SELECT language, javascript FROM {languages}');
-  while ($file = db_fetch_object($files)) {
-    if (!empty($file->javascript)) {
-      file_unmanaged_delete(file_create_path($locale_js_directory . '/' . $file->language . '_' . $file->javascript . '.js'));
-    }
-  }
-  // Delete the JavaScript translations directory if empty.
-  @rmdir($locale_js_directory);
-  
-  // Clear variables.
-  variable_del('language_default');
-  variable_del('language_count');
-  variable_del('language_negotiation');
-  variable_del('javascript_parsed');
-  variable_del('language_content_type_default');
-  variable_del('language_content_type_negotiation');
-  variable_del('locale_cache_strings');
-  variable_del('locale_js_directory');
-  
-  foreach (node_get_types() as $type => $content_type) {
-    $setting = variable_del('language_content_type_' . $type);
-  }
-  
-  // Switch back to English: with a $language->language value different from 'en'
-  // successive calls of t() might result in calling locale(), which in turn might 
-  // try to query the unexisting {locales_source} and {locales_target} tables.
-  drupal_init_language();
-  
-  // Remove tables.
-  drupal_uninstall_schema('locale');
-}
-
-/**
- * Implementation of hook_schema().
- */
-function locale_schema() {
-  $schema['languages'] = array(
-    'description' => 'List of all available languages in the system.',
-    'fields' => array(
-      'language' => array(
-        'type' => 'varchar',
-        'length' => 12,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => "Language code, e.g. 'de' or 'en-US'.",
-      ),
-      'name' => array(
-        'type' => 'varchar',
-        'length' => 64,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Language name in English.',
-      ),
-      'native' => array(
-        'type' => 'varchar',
-        'length' => 64,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Native language name.',
-      ),
-      'direction' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'Direction of language (Left-to-Right = 0, Right-to-Left = 1).',
-      ),
-      'enabled' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'Enabled flag (1 = Enabled, 0 = Disabled).',
-      ),
-      'plurals' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'Number of plural indexes in this language.',
-      ),
-      'formula' => array(
-        'type' => 'varchar',
-        'length' => 128,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Plural formula in PHP code to evaluate to get plural indexes.',
-      ),
-      'domain' => array(
-        'type' => 'varchar',
-        'length' => 128,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Domain to use for this language.',
-      ),
-      'prefix' => array(
-        'type' => 'varchar',
-        'length' => 128,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Path prefix to use for this language.',
-      ),
-      'weight' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'Weight, used in lists of languages.',
-      ),
-      'javascript' => array(
-        'type' => 'varchar',
-        'length' => 32,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Location of JavaScript translation file.',
-      ),
-    ),
-    'primary key' => array('language'),
-    'indexes' => array(
-      'list' => array('weight', 'name'),
-    ),
-  );
-
-  $schema['locales_source'] = array(
-    'description' => 'List of English source strings.',
-    'fields' => array(
-      'lid' => array(
-        'type' => 'serial',
-        'not null' => TRUE,
-        'description' => 'Unique identifier of this string.',
-      ),
-      'location' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Drupal path in case of online discovered translations or file path in case of imported strings.',
-      ),
-      'textgroup' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => 'default',
-        'description' => 'A module defined group of translations, see hook_locale().',
-      ),
-      'source' => array(
-        'type' => 'text',
-        'mysql_type' => 'blob',
-        'not null' => TRUE,
-        'description' => 'The original string in English.',
-      ),
-      'version' => array(
-        'type' => 'varchar',
-        'length' => 20,
-        'not null' => TRUE,
-        'default' => 'none',
-        'description' => 'Version of Drupal, where the string was last used (for locales optimization).',
-      ),
-    ),
-    'primary key' => array('lid'),
-    'indexes' => array(
-      'source' => array(array('source', 30)),
-    ),
-  );
-
-  $schema['locales_target'] = array(
-    'description' => 'Stores translated versions of strings.',
-    'fields' => array(
-      'lid' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'Source string ID. References {locales_source}.lid.',
-      ),
-      'translation' => array(
-        'type' => 'text',
-        'mysql_type' => 'blob',
-        'not null' => TRUE,
-        'description' => 'Translation string value in this language.',
-      ),
-      'language' => array(
-        'type' => 'varchar',
-        'length' => 12,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Language code. References {languages}.language.',
-      ),
-      'plid' => array(
-        'type' => 'int',
-        'not null' => TRUE, // This should be NULL for no referenced string, not zero.
-        'default' => 0,
-        'description' => 'Parent lid (lid of the previous string in the plural chain) in case of plural strings. References {locales_source}.lid.',
-      ),
-      'plural' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'Plural index number in case of plural strings.',
-      ),
-    ),
-    'primary key' => array('language', 'lid', 'plural'),
-    'indexes' => array(
-      'lid'      => array('lid'),
-      'plid'     => array('plid'),
-      'plural'   => array('plural'),
-    ),
-  );
-
-  return $schema;
-}
-
+ */
\ No newline at end of file
diff --git modules/menu/menu.install modules/menu/menu.install
index 11f25d5..47502ee 100644
--- modules/menu/menu.install
+++ modules/menu/menu.install
@@ -7,36 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function menu_install() {
-  // Create tables.
-  drupal_install_schema('menu');
-  $system_menus = menu_list_system_menus();
-  $descriptions = array(
-    'navigation' => 'The <em>Navigation</em> menu contains links such as Recent posts (if the Tracker module is enabled). Non-administrative links are added to this menu by default by modules.',
-    'user-menu' => "The <em>User menu</em> contains links related to the user's account, as well as the 'Log out' link.",
-    'management' => 'The <em>Management</em> menu contains links for content creation, site building, user management, and similar site activities.',
-    'main-menu' => 'The <em>Main menu</em> is the default source for the Main links which are often used by themes to show the major sections of a site.',
-    'secondary-menu' => 'The <em>Secondary menu</em> is the default source for the Secondary links which are often used for legal notices, contact details, and other navigation items that play a lesser role than the Main links.',
-  );
-  $t = get_t();
-  $query = db_insert('menu_custom')->fields(array('menu_name', 'title', 'description'));
-  foreach ($system_menus as $menu_name => $title) {
-    $query->values(array('menu_name' => $menu_name, 'title' => $t($title), 'description' => $t($descriptions[$menu_name])))->execute();
-  }
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function menu_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('menu');
-  menu_rebuild();
-}
-
-/**
  * Implementation of hook_schema().
  */
 function menu_schema() {
@@ -69,3 +39,32 @@ function menu_schema() {
   return $schema;
 }
 
+/**
+ * Implementation of hook_install().
+ */
+function menu_install() {
+  // Create tables.
+  drupal_install_schema('menu');
+  $system_menus = menu_list_system_menus();
+  $descriptions = array(
+    'navigation' => 'The <em>Navigation</em> menu contains links such as Recent posts (if the Tracker module is enabled). Non-administrative links are added to this menu by default by modules.',
+    'user-menu' => "The <em>User menu</em> contains links related to the user's account, as well as the 'Log out' link.",
+    'management' => 'The <em>Management</em> menu contains links for content creation, site building, user management, and similar site activities.',
+    'main-menu' => 'The <em>Main menu</em> is the default source for the Main links which are often used by themes to show the major sections of a site.',
+    'secondary-menu' => 'The <em>Secondary menu</em> is the default source for the Secondary links which are often used for legal notices, contact details, and other navigation items that play a lesser role than the Main links.',
+  );
+  $t = get_t();
+  $query = db_insert('menu_custom')->fields(array('menu_name', 'title', 'description'));
+  foreach ($system_menus as $menu_name => $title) {
+    $query->values(array('menu_name' => $menu_name, 'title' => $t($title), 'description' => $t($descriptions[$menu_name])))->execute();
+  }
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function menu_uninstall() {
+  // Remove tables.
+  drupal_uninstall_schema('menu');
+  menu_rebuild();
+}
\ No newline at end of file
diff --git modules/openid/openid.install modules/openid/openid.install
index 96254b3..08f5be9 100644
--- modules/openid/openid.install
+++ modules/openid/openid.install
@@ -7,22 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function openid_install() {
-  // Create table.
-  drupal_install_schema('openid');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function openid_uninstall() {
-  // Remove table.
-  drupal_uninstall_schema('openid');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function openid_schema() {
@@ -73,3 +57,19 @@ function openid_schema() {
 
   return $schema;
 }
+
+/**
+ * Implementation of hook_install().
+ */
+function openid_install() {
+  // Create table.
+  drupal_install_schema('openid');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function openid_uninstall() {
+  // Remove table.
+  drupal_uninstall_schema('openid');
+}
\ No newline at end of file
diff --git modules/poll/poll.install modules/poll/poll.install
index 12dc8d5..7f20444 100644
--- modules/poll/poll.install
+++ modules/poll/poll.install
@@ -7,22 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function poll_install() {
-  // Create tables.
-  drupal_install_schema('poll');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function poll_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('poll');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function poll_schema() {
@@ -144,6 +128,22 @@ function poll_schema() {
 }
 
 /**
+ * Implementation of hook_install().
+ */
+function poll_install() {
+  // Create tables.
+  drupal_install_schema('poll');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function poll_uninstall() {
+  // Remove tables.
+  drupal_uninstall_schema('poll');
+}
+
+/**
  * Rename {poll_choices} table to {poll_choice} and {poll_votes} to {poll_vote}.
  */
 function poll_update_7001() {
diff --git modules/profile/profile.install modules/profile/profile.install
index e5d41de..7a19a07 100644
--- modules/profile/profile.install
+++ modules/profile/profile.install
@@ -7,24 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function profile_install() {
-  // Create tables.
-  drupal_install_schema('profile');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function profile_uninstall() {
-  // Remove tables
-  drupal_uninstall_schema('profile');
-
-  variable_del('profile_block_author_fields');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function profile_schema() {
@@ -155,6 +137,24 @@ function profile_schema() {
 }
 
 /**
+ * Implementation of hook_install().
+ */
+function profile_install() {
+  // Create tables.
+  drupal_install_schema('profile');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function profile_uninstall() {
+  // Remove tables
+  drupal_uninstall_schema('profile');
+
+  variable_del('profile_block_author_fields');
+}
+
+/**
  * Rename {profile_fields} table to {profile_field} and {profile_values} to {profile_value}.
  */
 function profile_update_7001() {
diff --git modules/search/search.install modules/search/search.install
index 678e88c..c3ad704 100644
--- modules/search/search.install
+++ modules/search/search.install
@@ -7,26 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function search_install() {
-  // Create tables.
-  drupal_install_schema('search');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function search_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('search');
-
-  variable_del('minimum_word_size');
-  variable_del('overlap_cjk');
-  variable_del('search_cron_limit');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function search_schema() {
@@ -158,6 +138,26 @@ function search_schema() {
 }
 
 /**
+ * Implementation of hook_install().
+ */
+function search_install() {
+  // Create tables.
+  drupal_install_schema('search');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function search_uninstall() {
+  // Remove tables.
+  drupal_uninstall_schema('search');
+
+  variable_del('minimum_word_size');
+  variable_del('overlap_cjk');
+  variable_del('search_cron_limit');
+}
+
+/**
  * Replace unique keys in 'search_dataset' and 'search_index' by primary keys.
  */
 function search_update_7000() {
diff --git modules/simpletest/simpletest.install modules/simpletest/simpletest.install
index 5091c89..75e7908 100644
--- modules/simpletest/simpletest.install
+++ modules/simpletest/simpletest.install
@@ -7,6 +7,123 @@
  */
 
 /**
+ * Implementation of hook_schema().
+ */
+function simpletest_schema() {
+  $schema['simpletest'] = array(
+    'description' => 'Stores simpletest messages',
+    'fields' => array(
+      'message_id'  => array(
+        'type' => 'serial',
+        'not null' => TRUE,
+        'description' => 'Primary Key: Unique simpletest message ID.',
+      ),
+      'test_id' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'Test ID, messages belonging to the same ID are reported together',
+      ),
+      'test_class' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'The name of the class that created this message.',
+      ),
+      'status' => array(
+        'type' => 'varchar',
+        'length' => 9,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Message status. Core understands pass, fail, exception.',
+      ),
+      'message' => array(
+        'type' => 'text',
+        'not null' => TRUE,
+        'description' => 'The message itself.',
+      ),
+      'message_group' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'The message group this message belongs to. For example: warning, browser, user.',
+      ),
+      'function' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Name of the assertion function or method that created this message.',
+      ),
+      'line' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'Line number on which the function is called.',
+      ),
+      'file' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => 'Name of the file where the function is called.',
+      ),
+    ),
+    'primary key' => array('message_id'),
+    'indexes' => array(
+      'reporter' => array('test_class', 'message_id'),
+    ),
+  );
+  $schema['simpletest_test_id'] = array(
+    'description' => 'Stores simpletest test IDs, used to auto-incrament the test ID so that a fresh test ID is used.',
+    'fields' => array(
+      'test_id'  => array(
+        'type' => 'serial',
+        'not null' => TRUE,
+        'description' => 'Primary Key: Unique simpletest ID used to group test results together. Each time a set of tests
+                            are run a new test ID is used.',
+      ),
+    ),
+    'primary key' => array('test_id'),
+  );
+  return $schema;
+}
+
+/**
+ * Implementation of hook_requirements().
+ * Check that the cURL extension exists for PHP.
+ */
+function simpletest_requirements($phase) {
+  $requirements = array();
+  $t = get_t();
+
+  $has_curl = function_exists('curl_init');
+  $has_domdocument = class_exists('DOMDocument');
+
+  $requirements['curl'] = array(
+    'title' => $t('cURL'),
+    'value' => $has_curl ? $t('Enabled') : $t('Not found'),
+  );
+  if (!$has_curl) {
+    $requirements['curl']['severity'] = REQUIREMENT_ERROR;
+    $requirements['curl']['description'] = $t('Simpletest could not be installed because the PHP <a href="@curl_url">cURL</a> library is not available.', array('@curl_url' => 'http://php.net/manual/en/curl.setup.php'));
+  }
+
+  $requirements['php_domdocument'] = array(
+    'title' => $t('PHP DOMDocument class'),
+    'value' => $has_domdocument ? $t('Enabled') : $t('Not found'),
+  );
+  if (!$has_domdocument) {
+    $requirements['php_domdocument']['severity'] = REQUIREMENT_ERROR;
+    $requirements['php_domdocument']['description'] =t('SimpleTest requires the DOMDocument class to be available. Please check the configure command at the <a href="@link-phpinfo">PHP info page</a>.', array('@link-phpinfo' => url('admin/reports/status/php')));
+  }
+
+  return $requirements;
+}
+
+/**
  * Implementation of hook_install().
  */
 function simpletest_install() {
@@ -50,6 +167,19 @@ function simpletest_install() {
 }
 
 /**
+ * Implementation of hook_uninstall().
+ */
+function simpletest_uninstall() {
+  simpletest_clean_environment();
+
+  variable_del('simpletest_httpauth');
+  variable_del('simpletest_httpauth_username');
+  variable_del('simpletest_httpauth_pass');
+  variable_del('simpletest_devel');
+  drupal_uninstall_schema('simpletest');
+}
+
+/**
  * Generate test file.
  */
 function simpletest_generate_file($filename, $width, $lines, $type = 'binary-text') {
@@ -91,130 +221,4 @@ function simpletest_get_file_count($directory, $filename) {
     }
   }
   return $count;
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function simpletest_uninstall() {
-  simpletest_clean_environment();
-
-  variable_del('simpletest_httpauth');
-  variable_del('simpletest_httpauth_username');
-  variable_del('simpletest_httpauth_pass');
-  variable_del('simpletest_devel');
-  drupal_uninstall_schema('simpletest');
-}
-
-/**
- * Check that the cURL extension exists for PHP.
- */
-function simpletest_requirements($phase) {
-  $requirements = array();
-  $t = get_t();
-
-  $has_curl = function_exists('curl_init');
-  $has_domdocument = class_exists('DOMDocument');
-
-  $requirements['curl'] = array(
-    'title' => $t('cURL'),
-    'value' => $has_curl ? $t('Enabled') : $t('Not found'),
-  );
-  if (!$has_curl) {
-    $requirements['curl']['severity'] = REQUIREMENT_ERROR;
-    $requirements['curl']['description'] = $t('Simpletest could not be installed because the PHP <a href="@curl_url">cURL</a> library is not available.', array('@curl_url' => 'http://php.net/manual/en/curl.setup.php'));
-  }
-
-  $requirements['php_domdocument'] = array(
-    'title' => $t('PHP DOMDocument class'),
-    'value' => $has_domdocument ? $t('Enabled') : $t('Not found'),
-  );
-  if (!$has_domdocument) {
-    $requirements['php_domdocument']['severity'] = REQUIREMENT_ERROR;
-    $requirements['php_domdocument']['description'] =t('SimpleTest requires the DOMDocument class to be available. Please check the configure command at the <a href="@link-phpinfo">PHP info page</a>.', array('@link-phpinfo' => url('admin/reports/status/php')));
-  }
-
-  return $requirements;
-}
-
-function simpletest_schema() {
-  $schema['simpletest'] = array(
-    'description' => 'Stores simpletest messages',
-    'fields' => array(
-      'message_id'  => array(
-        'type' => 'serial',
-        'not null' => TRUE,
-        'description' => 'Primary Key: Unique simpletest message ID.',
-      ),
-      'test_id' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'Test ID, messages belonging to the same ID are reported together',
-      ),
-      'test_class' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'The name of the class that created this message.',
-      ),
-      'status' => array(
-        'type' => 'varchar',
-        'length' => 9,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Message status. Core understands pass, fail, exception.',
-      ),
-      'message' => array(
-        'type' => 'text',
-        'not null' => TRUE,
-        'description' => 'The message itself.',
-      ),
-      'message_group' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'The message group this message belongs to. For example: warning, browser, user.',
-      ),
-      'function' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Name of the assertion function or method that created this message.',
-      ),
-      'line' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'Line number on which the function is called.',
-      ),
-      'file' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Name of the file where the function is called.',
-      ),
-    ),
-    'primary key' => array('message_id'),
-    'indexes' => array(
-      'reporter' => array('test_class', 'message_id'),
-    ),
-  );
-  $schema['simpletest_test_id'] = array(
-    'description' => 'Stores simpletest test IDs, used to auto-incrament the test ID so that a fresh test ID is used.',
-    'fields' => array(
-      'test_id'  => array(
-        'type' => 'serial',
-        'not null' => TRUE,
-        'description' => 'Primary Key: Unique simpletest ID used to group test results together. Each time a set of tests
-                            are run a new test ID is used.',
-      ),
-    ),
-    'primary key' => array('test_id'),
-  );
-  return $schema;
-}
+}
\ No newline at end of file
diff --git modules/statistics/statistics.install modules/statistics/statistics.install
index 26a67f9..52bda25 100644
--- modules/statistics/statistics.install
+++ modules/statistics/statistics.install
@@ -7,31 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function statistics_install() {
-  // Create tables.
-  drupal_install_schema('statistics');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function statistics_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('statistics');
-
-  // Remove variables.
-  variable_del('statistics_count_content_views');
-  variable_del('statistics_enable_access_log');
-  variable_del('statistics_flush_accesslog_timer');
-  variable_del('statistics_day_timestamp');
-  variable_del('statistics_block_top_day_num');
-  variable_del('statistics_block_top_all_num');
-  variable_del('statistics_block_top_last_num');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function statistics_schema() {
@@ -142,6 +117,31 @@ function statistics_schema() {
 }
 
 /**
+ * Implementation of hook_install().
+ */
+function statistics_install() {
+  // Create tables.
+  drupal_install_schema('statistics');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function statistics_uninstall() {
+  // Remove tables.
+  drupal_uninstall_schema('statistics');
+
+  // Remove variables.
+  variable_del('statistics_count_content_views');
+  variable_del('statistics_enable_access_log');
+  variable_del('statistics_flush_accesslog_timer');
+  variable_del('statistics_day_timestamp');
+  variable_del('statistics_block_top_day_num');
+  variable_del('statistics_block_top_all_num');
+  variable_del('statistics_block_top_last_num');
+}
+
+/**
  * @defgroup updates-6.x-to-7.x System updates from 6.x to 7.x
  * @{
  */
diff --git modules/system/system.install modules/system/system.install
index 29d6c4e..f4d3bb1 100644
--- modules/system/system.install
+++ modules/system/system.install
@@ -7,421 +7,6 @@
  */
 
 /**
- * Test and report Drupal installation requirements.
- *
- * @param $phase
- *   The current system installation phase.
- * @return
- *   An array of system requirements.
- */
-function system_requirements($phase) {
-  global $base_url;
-  $requirements = array();
-  // Ensure translations don't break at install time
-  $t = get_t();
-
-  // Report Drupal version
-  if ($phase == 'runtime') {
-    $requirements['drupal'] = array(
-      'title' => $t('Drupal'),
-      'value' => VERSION,
-      'severity' => REQUIREMENT_INFO,
-      'weight' => -10,
-    );
-  }
-
-  // Web server information.
-  $software = $_SERVER['SERVER_SOFTWARE'];
-  $requirements['webserver'] = array(
-    'title' => $t('Web server'),
-    'value' => $software,
-  );
-
-  // Test PHP version
-  $requirements['php'] = array(
-    'title' => $t('PHP'),
-    'value' => ($phase == 'runtime') ? l(phpversion(), 'admin/reports/status/php') : phpversion(),
-  );
-  if (version_compare(phpversion(), DRUPAL_MINIMUM_PHP) < 0) {
-    $requirements['php']['description'] = $t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
-    $requirements['php']['severity'] = REQUIREMENT_ERROR;
-  }
-
-  // Make sure the tokenizer extension is enabled, which is required by the code registry.
-  $requirements['php_tokenizer'] = array(
-    'title' => $t('PHP tokenizer'),
-    'value' => $t('Enabled'),
-  );
-  if (!function_exists('token_get_all')) {
-    $requirements['php_tokenizer']['value'] = $t('Not enabled');
-    $requirements['php_tokenizer']['description'] = $t('Drupal requires the <a href="@url">tokenizer extension</a> to be enabled.', array('@url' => 'http://php.net/tokenizer'));
-    $requirements['php_tokenizer']['severity'] = REQUIREMENT_ERROR;
-  }
-
-  // Test PHP register_globals setting.
-  $requirements['php_register_globals'] = array(
-    'title' => $t('PHP register globals'),
-  );
-  $register_globals = trim(ini_get('register_globals'));
-  // Unfortunately, ini_get() may return many different values, and we can't
-  // be certain which values mean 'on', so we instead check for 'not off'
-  // since we never want to tell the user that their site is secure
-  // (register_globals off), when it is in fact on. We can only guarantee
-  // register_globals is off if the value returned is 'off', '', or 0.
-  if (!empty($register_globals) && strtolower($register_globals) != 'off') {
-    $requirements['php_register_globals']['description'] = $t('<em>register_globals</em> is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when <em>register_globals</em> is enabled. The PHP manual has instructions for <a href="http://php.net/configuration.changes">how to change configuration settings</a>.');
-    $requirements['php_register_globals']['severity'] = REQUIREMENT_ERROR;
-    $requirements['php_register_globals']['value'] = $t("Enabled ('@value')", array('@value' => $register_globals));
-  }
-  else {
-    $requirements['php_register_globals']['value'] = $t('Disabled');
-  }
-
-  // Test PHP memory_limit
-  $memory_limit = ini_get('memory_limit');
-  $requirements['php_memory_limit'] = array(
-    'title' => $t('PHP memory limit'),
-    'value' => $memory_limit == -1 ? t('-1 (Unlimited)') : $memory_limit,
-  );
-
-  if ($memory_limit && $memory_limit != -1 && parse_size($memory_limit) < parse_size(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT)) {
-    $description = '';
-    if ($phase == 'install') {
-      $description = $t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the installation process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
-    }
-    elseif ($phase == 'update') {
-      $description = $t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the update process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
-    }
-    elseif ($phase == 'runtime') {
-      $description = $t('Depending on your configuration, Drupal can run with a %memory_limit PHP memory limit. However, a %memory_minimum_limit PHP memory limit or above is recommended, especially if your site uses additional custom or contributed modules.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
-    }
-
-    if (!empty($description)) {
-      if ($php_ini_path = get_cfg_var('cfg_file_path')) {
-        $description .= ' ' . $t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path));
-      }
-      else {
-        $description .= ' ' . $t('Contact your system administrator or hosting provider for assistance with increasing your PHP memory limit.');
-      }
-
-      $requirements['php_memory_limit']['description'] = $description . ' ' . $t('See the <a href="@url">Drupal requirements</a> for more information.', array('@url' => 'http://drupal.org/requirements'));
-      $requirements['php_memory_limit']['severity'] = REQUIREMENT_WARNING;
-    }
-  }
-
-  // Test DB version
-  global $db_type;
-  if (function_exists('db_status_report')) {
-    $requirements += db_status_report($phase);
-  }
-
-  // Test settings.php file writability
-  if ($phase == 'runtime') {
-    $conf_dir = drupal_verify_install_file(conf_path(), FILE_NOT_WRITABLE, 'dir');
-    $conf_file = drupal_verify_install_file(conf_path() . '/settings.php', FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE);
-    if (!$conf_dir || !$conf_file) {
-      $requirements['settings.php'] = array(
-        'value' => $t('Not protected'),
-        'severity' => REQUIREMENT_ERROR,
-        'description' => '',
-      );
-      if (!$conf_dir) {
-        $requirements['settings.php']['description'] .= $t('The directory %file is not protected from modifications and poses a security risk. You must change the directory\'s permissions to be non-writable. ', array('%file' => conf_path()));
-      }
-      if (!$conf_file) {
-        $requirements['settings.php']['description'] .= $t('The file %file is not protected from modifications and poses a security risk. You must change the file\'s permissions to be non-writable.', array('%file' => conf_path() . '/settings.php'));
-      }
-    }
-    else {
-      $requirements['settings.php'] = array(
-        'value' => $t('Protected'),
-      );
-    }
-    $requirements['settings.php']['title'] = $t('Configuration file');
-  }
-
-  // Report cron status.
-  if ($phase == 'runtime') {
-    // Cron warning threshold defaults to two days.
-    $threshold_warning = variable_get('cron_threshold_warning', 172800);
-    // Cron error threshold defaults to two weeks.
-    $threshold_error = variable_get('cron_threshold_error', 1209600);
-    // Cron configuration help text.
-    $help = $t('For more information, see the online handbook entry for <a href="@cron-handbook">configuring cron jobs</a>.', array('@cron-handbook' => 'http://drupal.org/cron'));
-
-    // Determine when cron last ran.
-    $cron_last = variable_get('cron_last');
-    if (!is_numeric($cron_last)) {
-      $cron_last = variable_get('install_time', 0);
-    }
-
-    // Determine severity based on time since cron last ran.
-    $severity = REQUIREMENT_OK;
-    if (REQUEST_TIME - $cron_last > $threshold_error) {
-      $severity = REQUIREMENT_ERROR;
-    }
-    elseif (REQUEST_TIME - $cron_last > $threshold_warning) {
-      $severity = REQUIREMENT_WARNING;
-    }
-
-    // Set summary and description based on values determined above.
-    $summary = $t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last)));
-    $description = '';
-    if ($severity != REQUIREMENT_OK) {
-      $description = $t('Cron has not run recently.') . ' ' . $help;
-    }
-
-    $description .= ' ' . $t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/reports/status/run-cron')));
-    $description .= '<br />' . $t('To run cron from outside the site, go to <a href="!cron">!cron</a>', array('!cron' => url($base_url . '/cron.php', array('external' => TRUE, 'query' => 'cron_key=' . variable_get('cron_key', 'drupal')))));
-
-    $requirements['cron'] = array(
-      'title' => $t('Cron maintenance tasks'),
-      'severity' => $severity,
-      'value' => $summary,
-      'description' => $description
-    );
-  }
-
-  // Test files directory
-  $directory = file_directory_path();
-  $requirements['file system'] = array(
-    'title' => $t('File system'),
-  );
-
-  // For installer, create the directory if possible.
-  if ($phase == 'install' && !is_dir($directory) && @mkdir($directory)) {
-    @chmod($directory, 0775); // Necessary for non-webserver users.
-  }
-
-  $is_writable = is_writable($directory);
-  $is_directory = is_dir($directory);
-  if (!$is_writable || !$is_directory) {
-    $description = '';
-    $requirements['file system']['value'] = $t('Not writable');
-    if (!$is_directory) {
-      $error = $t('The directory %directory does not exist.', array('%directory' => $directory));
-    }
-    else {
-      $error = $t('The directory %directory is not writable.', array('%directory' => $directory));
-    }
-    // The files directory requirement check is done only during install and runtime.
-    if ($phase == 'runtime') {
-      $description = $error . ' ' . $t('You may need to set the correct directory at the <a href="@admin-file-system">file system settings page</a> or change the current directory\'s permissions so that it is writable.', array('@admin-file-system' => url('admin/settings/file-system')));
-    }
-    elseif ($phase == 'install') {
-      // For the installer UI, we need different wording. 'value' will
-      // be treated as version, so provide none there.
-      $description = $error . ' ' . $t('An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually, or ensure that the installer has the permissions to create it automatically. For more information, please see INSTALL.txt or the <a href="@handbook_url">online handbook</a>.', array('@handbook_url' => 'http://drupal.org/server-permissions'));
-      $requirements['file system']['value'] = '';
-    }
-    if (!empty($description)) {
-      $requirements['file system']['description'] = $description;
-      $requirements['file system']['severity'] = REQUIREMENT_ERROR;
-    }
-  }
-  else {
-    if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC) {
-      $requirements['file system']['value'] = $t('Writable (<em>public</em> download method)');
-    }
-    else {
-      $requirements['file system']['value'] = $t('Writable (<em>private</em> download method)');
-    }
-  }
-
-  // See if updates are available in update.php.
-  if ($phase == 'runtime') {
-    $requirements['update'] = array(
-      'title' => $t('Database updates'),
-      'severity' => REQUIREMENT_OK,
-      'value' => $t('Up to date'),
-    );
-
-    // Check installed modules.
-    foreach (module_list() as $module) {
-      $updates = drupal_get_schema_versions($module);
-      if ($updates !== FALSE) {
-        $default = drupal_get_installed_schema_version($module);
-        if (max($updates) > $default) {
-          $requirements['update']['severity'] = REQUIREMENT_ERROR;
-          $requirements['update']['value'] = $t('Out of date');
-          $requirements['update']['description'] = $t('Some modules have database schema updates to install. You should run the <a href="@update">database update script</a> immediately.', array('@update' => base_path() . 'update.php'));
-          break;
-        }
-      }
-    }
-  }
-
-  // Verify the update.php access setting
-  if ($phase == 'runtime') {
-    if (!empty($GLOBALS['update_free_access'])) {
-      $requirements['update access'] = array(
-        'value' => $t('Not protected'),
-        'severity' => REQUIREMENT_ERROR,
-        'description' => $t('The update.php script is accessible to everyone without authentication check, which is a security risk. You must change the $update_free_access value in your settings.php back to FALSE.'),
-      );
-    }
-    else {
-      $requirements['update access'] = array(
-        'value' => $t('Protected'),
-      );
-    }
-    $requirements['update access']['title'] = $t('Access to update.php');
-  }
-
-  // Test Unicode library
-  include_once DRUPAL_ROOT . '/includes/unicode.inc';
-  $requirements = array_merge($requirements, unicode_requirements());
-
-  if ($phase == 'runtime') {
-    // Check for update status module.
-    if (!module_exists('update')) {
-      $requirements['update status'] = array(
-        'value' => $t('Not enabled'),
-        'severity' => REQUIREMENT_WARNING,
-        'description' => $t('Update notifications are not enabled. It is <strong>highly recommended</strong> that you enable the update status module from the <a href="@module">module administration page</a> in order to stay up-to-date on new releases. For more information please read the <a href="@update">Update status handbook page</a>.', array('@update' => 'http://drupal.org/handbook/modules/update', '@module' => url('admin/build/modules'))),
-      );
-    }
-    else {
-      $requirements['update status'] = array(
-        'value' => $t('Enabled'),
-      );
-    }
-    $requirements['update status']['title'] = $t('Update notifications');
-
-    // Check that Drupal can issue HTTP requests.
-    if (variable_get('drupal_http_request_fails', TRUE) && !system_check_http_request()) {
-      $requirements['http requests'] = array(
-        'title' => $t('HTTP request status'),
-        'value' => $t('Fails'),
-        'severity' => REQUIREMENT_ERROR,
-        'description' => $t('Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services.  If you are certain that Drupal can access web pages but you are still seeing this message, you may add <code>$conf[\'drupal_http_request_fails\'] = FALSE;</code> to the bottom of your settings.php file.'),
-      );
-    }
-  }
-
-  return $requirements;
-}
-
-/**
- * Implementation of hook_install().
- */
-function system_install() {
-  if (db_driver() == 'pgsql') {
-    // We create some functions using global names instead of prefixing them
-    // like we do with table names. If this function is ever called again (for
-    // example, by the test framework when creating prefixed test databases),
-    // the global names will already exist. We therefore avoid trying to create
-    // them again in that case.
-
-    // Create functions.
-    db_query('CREATE OR REPLACE FUNCTION "greatest"(numeric, numeric) RETURNS numeric AS
-      \'SELECT CASE WHEN (($1 > $2) OR ($2 IS NULL)) THEN $1 ELSE $2 END;\'
-      LANGUAGE \'sql\''
-    );
-    db_query('CREATE OR REPLACE FUNCTION "greatest"(numeric, numeric, numeric) RETURNS numeric AS
-      \'SELECT greatest($1, greatest($2, $3));\'
-      LANGUAGE \'sql\''
-    );
-    if (!db_query("SELECT COUNT(*) FROM pg_proc WHERE proname = 'rand'")->fetchField()) {
-      db_query('CREATE OR REPLACE FUNCTION "rand"() RETURNS float AS
-        \'SELECT random();\'
-        LANGUAGE \'sql\''
-      );
-    }
-
-    if (!db_query("SELECT COUNT(*) FROM pg_proc WHERE proname = 'concat'")->fetchField()) {
-      db_query('CREATE OR REPLACE FUNCTION "concat"(text, text) RETURNS text AS
-        \'SELECT $1 || $2;\'
-        LANGUAGE \'sql\''
-      );
-    }
-    db_query('CREATE OR REPLACE FUNCTION "if"(boolean, text, text) RETURNS text AS
-      \'SELECT CASE WHEN $1 THEN $2 ELSE $3 END;\'
-      LANGUAGE \'sql\''
-    );
-    db_query('CREATE OR REPLACE FUNCTION "if"(boolean, integer, integer) RETURNS integer AS
-      \'SELECT CASE WHEN $1 THEN $2 ELSE $3 END;\'
-      LANGUAGE \'sql\''
-    );
-  }
-
-  // Create tables.
-  $modules = array('system', 'filter', 'user', 'node');
-  foreach ($modules as $module) {
-    drupal_install_schema($module);
-  }
-
-  // Load system theme data appropriately.
-  system_theme_data();
-
-  // Inserting uid 0 here confuses MySQL -- the next user might be created as
-  // uid 2 which is not what we want. So we insert the first user here, the
-  // anonymous user. uid is 1 here for now, but very soon it will be changed
-  // to 0.
-  db_query("INSERT INTO {users} (name, mail) VALUES('%s', '%s')", '', '');
-  // We need some placeholders here as name and mail are uniques and data is
-  // presumed to be a serialized array. Install will change uid 1 immediately
-  // anyways. So we insert the superuser here, the uid is 2 here for now, but
-  // very soon it will be changed to 1.
-  db_query("INSERT INTO {users} (name, mail, created, status, data) VALUES('%s', '%s', %d, %d, '%s')", 'placeholder-for-uid-1', 'placeholder-for-uid-1', REQUEST_TIME, 1, serialize(array()));
-  // This sets the above two users uid 0 (anonymous). We avoid an explicit 0
-  // otherwise MySQL might insert the next auto_increment value.
-  db_query("UPDATE {users} SET uid = uid - uid WHERE name = '%s'", '');
-  // This sets uid 1 (superuser). We skip uid 2 but that's not a big problem.
-  db_query("UPDATE {users} SET uid = 1 WHERE name = '%s'", 'placeholder-for-uid-1');
-
-  // Built-in roles.
-  db_query("INSERT INTO {role} (name) VALUES ('%s')", 'anonymous user');
-  db_query("INSERT INTO {role} (name) VALUES ('%s')", 'authenticated user');
-
-  // Anonymous role permissions.
-  db_query("INSERT INTO {role_permission} (rid, permission) VALUES (%d, '%s')", 1, 'access content');
-
-  // Authenticated role permissions.
-  db_query("INSERT INTO {role_permission} (rid, permission) VALUES (%d, '%s')", 2, 'access comments');
-  db_query("INSERT INTO {role_permission} (rid, permission) VALUES (%d, '%s')", 2, 'access content');
-  db_query("INSERT INTO {role_permission} (rid, permission) VALUES (%d, '%s')", 2, 'post comments');
-  db_query("INSERT INTO {role_permission} (rid, permission) VALUES (%d, '%s')", 2, 'post comments without approval');
-
-  db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'theme_default', 's:7:"garland";');
-  db_query("UPDATE {system} SET status = %d WHERE type = '%s' AND name = '%s'", 1, 'theme', 'garland');
-
-  db_query("INSERT INTO {node_access} (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, '%s', %d, %d, %d)", 0, 0, 'all', 1, 0, 0);
-
-  // Add text formats.
-  db_query("INSERT INTO {filter_format} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Filtered HTML', ',1,2,', 1);
-  db_query("INSERT INTO {filter_format} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Full HTML', '', 1);
-
-  // Enable filters for each text format.
-
-  // Filtered HTML:
-  // URL filter.
-  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 2, 0);
-  // HTML filter.
-  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 0, 1);
-  // Line break filter.
-  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 1, 2);
-  // HTML corrector filter.
-  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 3, 10);
-
-  // Full HTML:
-  // URL filter.
-  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 2, 'filter', 2, 0);
-  // Line break filter.
-  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 2, 'filter', 1, 1);
-  // HTML corrector filter.
-  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 2, 'filter', 3, 10);
-
-  db_query("INSERT INTO {variable} (name, value) VALUES ('%s','%s')", 'filter_html_1', 'i:1;');
-
-  db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'node_options_forum', 'a:1:{i:0;s:6:"status";}');
-
-  $cron_key = serialize(md5(mt_rand()));
-
-  db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'cron_key', $cron_key);
-}
-
-/**
  * Implementation of hook_schema().
  */
 function system_schema() {
@@ -1344,6 +929,421 @@ function system_schema() {
   return $schema;
 }
 
+/**
+ * Test and report Drupal installation requirements.
+ *
+ * @param $phase
+ *   The current system installation phase.
+ * @return
+ *   An array of system requirements.
+ */
+function system_requirements($phase) {
+  global $base_url;
+  $requirements = array();
+  // Ensure translations don't break at install time
+  $t = get_t();
+
+  // Report Drupal version
+  if ($phase == 'runtime') {
+    $requirements['drupal'] = array(
+      'title' => $t('Drupal'),
+      'value' => VERSION,
+      'severity' => REQUIREMENT_INFO,
+      'weight' => -10,
+    );
+  }
+
+  // Web server information.
+  $software = $_SERVER['SERVER_SOFTWARE'];
+  $requirements['webserver'] = array(
+    'title' => $t('Web server'),
+    'value' => $software,
+  );
+
+  // Test PHP version
+  $requirements['php'] = array(
+    'title' => $t('PHP'),
+    'value' => ($phase == 'runtime') ? l(phpversion(), 'admin/reports/status/php') : phpversion(),
+  );
+  if (version_compare(phpversion(), DRUPAL_MINIMUM_PHP) < 0) {
+    $requirements['php']['description'] = $t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
+    $requirements['php']['severity'] = REQUIREMENT_ERROR;
+  }
+
+  // Make sure the tokenizer extension is enabled, which is required by the code registry.
+  $requirements['php_tokenizer'] = array(
+    'title' => $t('PHP tokenizer'),
+    'value' => $t('Enabled'),
+  );
+  if (!function_exists('token_get_all')) {
+    $requirements['php_tokenizer']['value'] = $t('Not enabled');
+    $requirements['php_tokenizer']['description'] = $t('Drupal requires the <a href="@url">tokenizer extension</a> to be enabled.', array('@url' => 'http://php.net/tokenizer'));
+    $requirements['php_tokenizer']['severity'] = REQUIREMENT_ERROR;
+  }
+
+  // Test PHP register_globals setting.
+  $requirements['php_register_globals'] = array(
+    'title' => $t('PHP register globals'),
+  );
+  $register_globals = trim(ini_get('register_globals'));
+  // Unfortunately, ini_get() may return many different values, and we can't
+  // be certain which values mean 'on', so we instead check for 'not off'
+  // since we never want to tell the user that their site is secure
+  // (register_globals off), when it is in fact on. We can only guarantee
+  // register_globals is off if the value returned is 'off', '', or 0.
+  if (!empty($register_globals) && strtolower($register_globals) != 'off') {
+    $requirements['php_register_globals']['description'] = $t('<em>register_globals</em> is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when <em>register_globals</em> is enabled. The PHP manual has instructions for <a href="http://php.net/configuration.changes">how to change configuration settings</a>.');
+    $requirements['php_register_globals']['severity'] = REQUIREMENT_ERROR;
+    $requirements['php_register_globals']['value'] = $t("Enabled ('@value')", array('@value' => $register_globals));
+  }
+  else {
+    $requirements['php_register_globals']['value'] = $t('Disabled');
+  }
+
+  // Test PHP memory_limit
+  $memory_limit = ini_get('memory_limit');
+  $requirements['php_memory_limit'] = array(
+    'title' => $t('PHP memory limit'),
+    'value' => $memory_limit == -1 ? t('-1 (Unlimited)') : $memory_limit,
+  );
+
+  if ($memory_limit && $memory_limit != -1 && parse_size($memory_limit) < parse_size(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT)) {
+    $description = '';
+    if ($phase == 'install') {
+      $description = $t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the installation process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
+    }
+    elseif ($phase == 'update') {
+      $description = $t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the update process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
+    }
+    elseif ($phase == 'runtime') {
+      $description = $t('Depending on your configuration, Drupal can run with a %memory_limit PHP memory limit. However, a %memory_minimum_limit PHP memory limit or above is recommended, especially if your site uses additional custom or contributed modules.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
+    }
+
+    if (!empty($description)) {
+      if ($php_ini_path = get_cfg_var('cfg_file_path')) {
+        $description .= ' ' . $t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path));
+      }
+      else {
+        $description .= ' ' . $t('Contact your system administrator or hosting provider for assistance with increasing your PHP memory limit.');
+      }
+
+      $requirements['php_memory_limit']['description'] = $description . ' ' . $t('See the <a href="@url">Drupal requirements</a> for more information.', array('@url' => 'http://drupal.org/requirements'));
+      $requirements['php_memory_limit']['severity'] = REQUIREMENT_WARNING;
+    }
+  }
+
+  // Test DB version
+  global $db_type;
+  if (function_exists('db_status_report')) {
+    $requirements += db_status_report($phase);
+  }
+
+  // Test settings.php file writability
+  if ($phase == 'runtime') {
+    $conf_dir = drupal_verify_install_file(conf_path(), FILE_NOT_WRITABLE, 'dir');
+    $conf_file = drupal_verify_install_file(conf_path() . '/settings.php', FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE);
+    if (!$conf_dir || !$conf_file) {
+      $requirements['settings.php'] = array(
+        'value' => $t('Not protected'),
+        'severity' => REQUIREMENT_ERROR,
+        'description' => '',
+      );
+      if (!$conf_dir) {
+        $requirements['settings.php']['description'] .= $t('The directory %file is not protected from modifications and poses a security risk. You must change the directory\'s permissions to be non-writable. ', array('%file' => conf_path()));
+      }
+      if (!$conf_file) {
+        $requirements['settings.php']['description'] .= $t('The file %file is not protected from modifications and poses a security risk. You must change the file\'s permissions to be non-writable.', array('%file' => conf_path() . '/settings.php'));
+      }
+    }
+    else {
+      $requirements['settings.php'] = array(
+        'value' => $t('Protected'),
+      );
+    }
+    $requirements['settings.php']['title'] = $t('Configuration file');
+  }
+
+  // Report cron status.
+  if ($phase == 'runtime') {
+    // Cron warning threshold defaults to two days.
+    $threshold_warning = variable_get('cron_threshold_warning', 172800);
+    // Cron error threshold defaults to two weeks.
+    $threshold_error = variable_get('cron_threshold_error', 1209600);
+    // Cron configuration help text.
+    $help = $t('For more information, see the online handbook entry for <a href="@cron-handbook">configuring cron jobs</a>.', array('@cron-handbook' => 'http://drupal.org/cron'));
+
+    // Determine when cron last ran.
+    $cron_last = variable_get('cron_last');
+    if (!is_numeric($cron_last)) {
+      $cron_last = variable_get('install_time', 0);
+    }
+
+    // Determine severity based on time since cron last ran.
+    $severity = REQUIREMENT_OK;
+    if (REQUEST_TIME - $cron_last > $threshold_error) {
+      $severity = REQUIREMENT_ERROR;
+    }
+    elseif (REQUEST_TIME - $cron_last > $threshold_warning) {
+      $severity = REQUIREMENT_WARNING;
+    }
+
+    // Set summary and description based on values determined above.
+    $summary = $t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last)));
+    $description = '';
+    if ($severity != REQUIREMENT_OK) {
+      $description = $t('Cron has not run recently.') . ' ' . $help;
+    }
+
+    $description .= ' ' . $t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/reports/status/run-cron')));
+    $description .= '<br />' . $t('To run cron from outside the site, go to <a href="!cron">!cron</a>', array('!cron' => url($base_url . '/cron.php', array('external' => TRUE, 'query' => 'cron_key=' . variable_get('cron_key', 'drupal')))));
+
+    $requirements['cron'] = array(
+      'title' => $t('Cron maintenance tasks'),
+      'severity' => $severity,
+      'value' => $summary,
+      'description' => $description
+    );
+  }
+
+  // Test files directory
+  $directory = file_directory_path();
+  $requirements['file system'] = array(
+    'title' => $t('File system'),
+  );
+
+  // For installer, create the directory if possible.
+  if ($phase == 'install' && !is_dir($directory) && @mkdir($directory)) {
+    @chmod($directory, 0775); // Necessary for non-webserver users.
+  }
+
+  $is_writable = is_writable($directory);
+  $is_directory = is_dir($directory);
+  if (!$is_writable || !$is_directory) {
+    $description = '';
+    $requirements['file system']['value'] = $t('Not writable');
+    if (!$is_directory) {
+      $error = $t('The directory %directory does not exist.', array('%directory' => $directory));
+    }
+    else {
+      $error = $t('The directory %directory is not writable.', array('%directory' => $directory));
+    }
+    // The files directory requirement check is done only during install and runtime.
+    if ($phase == 'runtime') {
+      $description = $error . ' ' . $t('You may need to set the correct directory at the <a href="@admin-file-system">file system settings page</a> or change the current directory\'s permissions so that it is writable.', array('@admin-file-system' => url('admin/settings/file-system')));
+    }
+    elseif ($phase == 'install') {
+      // For the installer UI, we need different wording. 'value' will
+      // be treated as version, so provide none there.
+      $description = $error . ' ' . $t('An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually, or ensure that the installer has the permissions to create it automatically. For more information, please see INSTALL.txt or the <a href="@handbook_url">online handbook</a>.', array('@handbook_url' => 'http://drupal.org/server-permissions'));
+      $requirements['file system']['value'] = '';
+    }
+    if (!empty($description)) {
+      $requirements['file system']['description'] = $description;
+      $requirements['file system']['severity'] = REQUIREMENT_ERROR;
+    }
+  }
+  else {
+    if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC) {
+      $requirements['file system']['value'] = $t('Writable (<em>public</em> download method)');
+    }
+    else {
+      $requirements['file system']['value'] = $t('Writable (<em>private</em> download method)');
+    }
+  }
+
+  // See if updates are available in update.php.
+  if ($phase == 'runtime') {
+    $requirements['update'] = array(
+      'title' => $t('Database updates'),
+      'severity' => REQUIREMENT_OK,
+      'value' => $t('Up to date'),
+    );
+
+    // Check installed modules.
+    foreach (module_list() as $module) {
+      $updates = drupal_get_schema_versions($module);
+      if ($updates !== FALSE) {
+        $default = drupal_get_installed_schema_version($module);
+        if (max($updates) > $default) {
+          $requirements['update']['severity'] = REQUIREMENT_ERROR;
+          $requirements['update']['value'] = $t('Out of date');
+          $requirements['update']['description'] = $t('Some modules have database schema updates to install. You should run the <a href="@update">database update script</a> immediately.', array('@update' => base_path() . 'update.php'));
+          break;
+        }
+      }
+    }
+  }
+
+  // Verify the update.php access setting
+  if ($phase == 'runtime') {
+    if (!empty($GLOBALS['update_free_access'])) {
+      $requirements['update access'] = array(
+        'value' => $t('Not protected'),
+        'severity' => REQUIREMENT_ERROR,
+        'description' => $t('The update.php script is accessible to everyone without authentication check, which is a security risk. You must change the $update_free_access value in your settings.php back to FALSE.'),
+      );
+    }
+    else {
+      $requirements['update access'] = array(
+        'value' => $t('Protected'),
+      );
+    }
+    $requirements['update access']['title'] = $t('Access to update.php');
+  }
+
+  // Test Unicode library
+  include_once DRUPAL_ROOT . '/includes/unicode.inc';
+  $requirements = array_merge($requirements, unicode_requirements());
+
+  if ($phase == 'runtime') {
+    // Check for update status module.
+    if (!module_exists('update')) {
+      $requirements['update status'] = array(
+        'value' => $t('Not enabled'),
+        'severity' => REQUIREMENT_WARNING,
+        'description' => $t('Update notifications are not enabled. It is <strong>highly recommended</strong> that you enable the update status module from the <a href="@module">module administration page</a> in order to stay up-to-date on new releases. For more information please read the <a href="@update">Update status handbook page</a>.', array('@update' => 'http://drupal.org/handbook/modules/update', '@module' => url('admin/build/modules'))),
+      );
+    }
+    else {
+      $requirements['update status'] = array(
+        'value' => $t('Enabled'),
+      );
+    }
+    $requirements['update status']['title'] = $t('Update notifications');
+
+    // Check that Drupal can issue HTTP requests.
+    if (variable_get('drupal_http_request_fails', TRUE) && !system_check_http_request()) {
+      $requirements['http requests'] = array(
+        'title' => $t('HTTP request status'),
+        'value' => $t('Fails'),
+        'severity' => REQUIREMENT_ERROR,
+        'description' => $t('Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services.  If you are certain that Drupal can access web pages but you are still seeing this message, you may add <code>$conf[\'drupal_http_request_fails\'] = FALSE;</code> to the bottom of your settings.php file.'),
+      );
+    }
+  }
+
+  return $requirements;
+}
+
+/**
+ * Implementation of hook_install().
+ */
+function system_install() {
+  if (db_driver() == 'pgsql') {
+    // We create some functions using global names instead of prefixing them
+    // like we do with table names. If this function is ever called again (for
+    // example, by the test framework when creating prefixed test databases),
+    // the global names will already exist. We therefore avoid trying to create
+    // them again in that case.
+
+    // Create functions.
+    db_query('CREATE OR REPLACE FUNCTION "greatest"(numeric, numeric) RETURNS numeric AS
+      \'SELECT CASE WHEN (($1 > $2) OR ($2 IS NULL)) THEN $1 ELSE $2 END;\'
+      LANGUAGE \'sql\''
+    );
+    db_query('CREATE OR REPLACE FUNCTION "greatest"(numeric, numeric, numeric) RETURNS numeric AS
+      \'SELECT greatest($1, greatest($2, $3));\'
+      LANGUAGE \'sql\''
+    );
+    if (!db_query("SELECT COUNT(*) FROM pg_proc WHERE proname = 'rand'")->fetchField()) {
+      db_query('CREATE OR REPLACE FUNCTION "rand"() RETURNS float AS
+        \'SELECT random();\'
+        LANGUAGE \'sql\''
+      );
+    }
+
+    if (!db_query("SELECT COUNT(*) FROM pg_proc WHERE proname = 'concat'")->fetchField()) {
+      db_query('CREATE OR REPLACE FUNCTION "concat"(text, text) RETURNS text AS
+        \'SELECT $1 || $2;\'
+        LANGUAGE \'sql\''
+      );
+    }
+    db_query('CREATE OR REPLACE FUNCTION "if"(boolean, text, text) RETURNS text AS
+      \'SELECT CASE WHEN $1 THEN $2 ELSE $3 END;\'
+      LANGUAGE \'sql\''
+    );
+    db_query('CREATE OR REPLACE FUNCTION "if"(boolean, integer, integer) RETURNS integer AS
+      \'SELECT CASE WHEN $1 THEN $2 ELSE $3 END;\'
+      LANGUAGE \'sql\''
+    );
+  }
+
+  // Create tables.
+  $modules = array('system', 'filter', 'user', 'node');
+  foreach ($modules as $module) {
+    drupal_install_schema($module);
+  }
+
+  // Load system theme data appropriately.
+  system_theme_data();
+
+  // Inserting uid 0 here confuses MySQL -- the next user might be created as
+  // uid 2 which is not what we want. So we insert the first user here, the
+  // anonymous user. uid is 1 here for now, but very soon it will be changed
+  // to 0.
+  db_query("INSERT INTO {users} (name, mail) VALUES('%s', '%s')", '', '');
+  // We need some placeholders here as name and mail are uniques and data is
+  // presumed to be a serialized array. Install will change uid 1 immediately
+  // anyways. So we insert the superuser here, the uid is 2 here for now, but
+  // very soon it will be changed to 1.
+  db_query("INSERT INTO {users} (name, mail, created, status, data) VALUES('%s', '%s', %d, %d, '%s')", 'placeholder-for-uid-1', 'placeholder-for-uid-1', REQUEST_TIME, 1, serialize(array()));
+  // This sets the above two users uid 0 (anonymous). We avoid an explicit 0
+  // otherwise MySQL might insert the next auto_increment value.
+  db_query("UPDATE {users} SET uid = uid - uid WHERE name = '%s'", '');
+  // This sets uid 1 (superuser). We skip uid 2 but that's not a big problem.
+  db_query("UPDATE {users} SET uid = 1 WHERE name = '%s'", 'placeholder-for-uid-1');
+
+  // Built-in roles.
+  db_query("INSERT INTO {role} (name) VALUES ('%s')", 'anonymous user');
+  db_query("INSERT INTO {role} (name) VALUES ('%s')", 'authenticated user');
+
+  // Anonymous role permissions.
+  db_query("INSERT INTO {role_permission} (rid, permission) VALUES (%d, '%s')", 1, 'access content');
+
+  // Authenticated role permissions.
+  db_query("INSERT INTO {role_permission} (rid, permission) VALUES (%d, '%s')", 2, 'access comments');
+  db_query("INSERT INTO {role_permission} (rid, permission) VALUES (%d, '%s')", 2, 'access content');
+  db_query("INSERT INTO {role_permission} (rid, permission) VALUES (%d, '%s')", 2, 'post comments');
+  db_query("INSERT INTO {role_permission} (rid, permission) VALUES (%d, '%s')", 2, 'post comments without approval');
+
+  db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'theme_default', 's:7:"garland";');
+  db_query("UPDATE {system} SET status = %d WHERE type = '%s' AND name = '%s'", 1, 'theme', 'garland');
+
+  db_query("INSERT INTO {node_access} (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, '%s', %d, %d, %d)", 0, 0, 'all', 1, 0, 0);
+
+  // Add text formats.
+  db_query("INSERT INTO {filter_format} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Filtered HTML', ',1,2,', 1);
+  db_query("INSERT INTO {filter_format} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Full HTML', '', 1);
+
+  // Enable filters for each text format.
+
+  // Filtered HTML:
+  // URL filter.
+  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 2, 0);
+  // HTML filter.
+  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 0, 1);
+  // Line break filter.
+  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 1, 2);
+  // HTML corrector filter.
+  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 1, 'filter', 3, 10);
+
+  // Full HTML:
+  // URL filter.
+  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 2, 'filter', 2, 0);
+  // Line break filter.
+  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 2, 'filter', 1, 1);
+  // HTML corrector filter.
+  db_query("INSERT INTO {filter} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", 2, 'filter', 3, 10);
+
+  db_query("INSERT INTO {variable} (name, value) VALUES ('%s','%s')", 'filter_html_1', 'i:1;');
+
+  db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'node_options_forum', 'a:1:{i:0;s:6:"status";}');
+
+  $cron_key = serialize(md5(mt_rand()));
+
+  db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'cron_key', $cron_key);
+}
+
 // Updates for core.
 
 function system_update_last_removed() {
diff --git modules/taxonomy/taxonomy.install modules/taxonomy/taxonomy.install
index d4489fb..2ca8a1f 100644
--- modules/taxonomy/taxonomy.install
+++ modules/taxonomy/taxonomy.install
@@ -6,26 +6,6 @@
  * Install, update and uninstall functions for the taxonomy module.
  */
 
- /**
- * Implementation of hook_install().
- */
-function taxonomy_install() {
-  // Create tables.
-  drupal_install_schema('taxonomy');
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function taxonomy_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('taxonomy');
-
-  // Remove variables.
-  variable_del('taxonomy_override_selector');
-  variable_del('taxonomy_terms_per_page_admin');
-}
-
 /**
  * Implementation of hook_schema().
  */
@@ -310,6 +290,26 @@ function taxonomy_schema() {
 }
 
 /**
+ * Implementation of hook_install().
+ */
+function taxonomy_install() {
+  // Create tables.
+  drupal_install_schema('taxonomy');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function taxonomy_uninstall() {
+  // Remove tables.
+  drupal_uninstall_schema('taxonomy');
+
+  // Remove variables.
+  variable_del('taxonomy_override_selector');
+  variable_del('taxonomy_terms_per_page_admin');
+}
+
+/**
  * Rename taxonomy tables.
  */
 function taxonomy_update_7001() {
diff --git modules/trigger/trigger.install modules/trigger/trigger.install
index b79af18..23dad67 100644
--- modules/trigger/trigger.install
+++ modules/trigger/trigger.install
@@ -7,25 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function trigger_install() {
-  // Create tables.
-  drupal_install_schema('trigger');
-
-  // Do initial synchronization of actions in code and the database.
-  actions_synchronize();
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function trigger_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('trigger');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function trigger_schema() {
@@ -65,4 +46,21 @@ function trigger_schema() {
   return $schema;
 }
 
+/**
+ * Implementation of hook_install().
+ */
+function trigger_install() {
+  // Create tables.
+  drupal_install_schema('trigger');
 
+  // Do initial synchronization of actions in code and the database.
+  actions_synchronize();
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function trigger_uninstall() {
+  // Remove tables.
+  drupal_uninstall_schema('trigger');
+}
\ No newline at end of file
diff --git modules/update/update.install modules/update/update.install
index 7ea9de3..ce01c06 100644
--- modules/update/update.install
+++ modules/update/update.install
@@ -7,6 +7,30 @@
  */
 
 /**
+ * Implementation of hook_schema().
+ */
+function update_schema() {
+  $schema['cache_update'] = drupal_get_schema_unprocessed('system', 'cache');
+  $schema['cache_update']['description'] = 'Cache table for the Update module to store information about available releases, fetched from central server.';
+  return $schema;
+}
+
+/**
+ * Private helper to clear out stale variables from update_status 5.x contrib.
+ *
+ * @see update_install()
+ * @see update_update_6000()
+ */
+function _update_remove_update_status_variables() {
+  variable_del('update_status_settings');
+  variable_del('update_status_notify_emails');
+  variable_del('update_status_check_frequency');
+  variable_del('update_status_notification_threshold');
+  variable_del('update_status_last');
+  variable_del('update_status_fetch_url');
+}
+
+/**
  * Implementation of hook_install().
  */
 function update_install() {
@@ -37,30 +61,6 @@ function update_uninstall() {
 }
 
 /**
- * Implementation of hook_schema().
- */
-function update_schema() {
-  $schema['cache_update'] = drupal_get_schema_unprocessed('system', 'cache');
-  $schema['cache_update']['description'] = 'Cache table for the Update module to store information about available releases, fetched from central server.';
-  return $schema;
-}
-
-/**
- * Private helper to clear out stale variables from update_status 5.x contrib.
- *
- * @see update_install()
- * @see update_update_6000()
- */
-function _update_remove_update_status_variables() {
-  variable_del('update_status_settings');
-  variable_del('update_status_notify_emails');
-  variable_del('update_status_check_frequency');
-  variable_del('update_status_notification_threshold');
-  variable_del('update_status_last');
-  variable_del('update_status_fetch_url');
-}
-
-/**
  * Clear out stale variables from update_status.
  */
 function update_update_6000() {
diff --git modules/upload/upload.install modules/upload/upload.install
index 8a8e98c..bccda7c 100644
--- modules/upload/upload.install
+++ modules/upload/upload.install
@@ -7,26 +7,6 @@
  */
 
 /**
- * Implementation of hook_install().
- */
-function upload_install() {
-  // Create table. The upload table might have been created in the Drupal 5
-  // to Drupal 6 upgrade, and was migrated from the file_revisions table. So
-  // in this case, there is no need to create the table, it is already there.
-  if (!db_table_exists('upload')) {
-    drupal_install_schema('upload');
-  }
-}
-
-/**
- * Implementation of hook_uninstall().
- */
-function upload_uninstall() {
-  // Remove tables.
-  drupal_uninstall_schema('upload');
-}
-
-/**
  * Implementation of hook_schema().
  */
 function upload_schema() {
@@ -87,4 +67,22 @@ function upload_schema() {
   return $schema;
 }
 
+/**
+ * Implementation of hook_install().
+ */
+function upload_install() {
+  // Create table. The upload table might have been created in the Drupal 5
+  // to Drupal 6 upgrade, and was migrated from the file_revisions table. So
+  // in this case, there is no need to create the table, it is already there.
+  if (!db_table_exists('upload')) {
+    drupal_install_schema('upload');
+  }
+}
 
+/**
+ * Implementation of hook_uninstall().
+ */
+function upload_uninstall() {
+  // Remove tables.
+  drupal_uninstall_schema('upload');
+}
\ No newline at end of file
