diff --git a/storm.install b/storm.install
index 25c8d4a..968d1a9 100644
--- a/storm.install
+++ b/storm.install
@@ -15,6 +15,8 @@ function storm_install() {
   variable_set('storm_organization_nid', 0);
   variable_set('storm_yearsrangebegin', 2001);
   variable_set('storm_yearsrangeend', 2012);
+
+  drupal_install_schema('storm');
 }
 
 /**
@@ -27,6 +29,29 @@ function storm_uninstall() {
   variable_del('storm_organization_nid');
   variable_del('storm_yearsrangebegin');
   variable_del('storm_yearsrangeend');
+
+  drupal_uninstall_schema('storm');
+}
+
+function storm_schema() {
+  $schema['stormattribute'] = array(
+    'fields'          => array(
+      'aid'           => array('type' => 'serial', 'not null' => TRUE),
+      'domain'        => array('type' => 'varchar', 'length' => 100),
+      'akey'          => array('type' => 'varchar', 'length' => 100),
+      'avalue'        => array('type' => 'varchar', 'length' => 100),
+      'parent_domain' => array('type' => 'varchar', 'length' => 100),
+      'weight'        => array('type' => 'int','not null' => FALSE, 'default' => 0, 'size' => 'small'),
+      'isdefault'     => array('type' => 'int','not null' => FALSE, 'default' => 0, 'size' => 'tiny'),
+      'isactive'      => array('type' => 'int','not null' => FALSE, 'default' => 1, 'size' => 'tiny'),
+    ),
+    'primary key' => array('aid'),
+    'indexes' => array(
+      'domain'        => array('domain'),
+    ),
+  );
+
+  return $schema;
 }
 
 /**
@@ -43,3 +68,32 @@ function storm_update_6101() {
     
   return $ret;
 }
+
+function storm_update_6201() {
+  $ret = array();
+
+  // Only run this update if was not previously run as part of the legacy stormattribute module
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 5) {
+    db_add_field($ret, 'stormattribute', 'parent_domain', array('type' => 'varchar', 'length' => 100));
+    db_add_field($ret, 'stormattribute', 'isactive', array('type' => 'int','not null' => FALSE, 'default' => 1, 'size' => 'tiny'));
+    db_add_field($ret, 'stormattribute', 'isdefault', array('type' => 'int','not null' => FALSE, 'default' => 0, 'size' => 'tiny'));
+  }
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6) {
+    switch ($GLOBALS['db_type']) {
+      case 'mysql':
+      case 'mysqli':
+        $ret[] = update_sql("ALTER TABLE {stormattribute} CHANGE COLUMN weight weight SMALLINT NOT NULL default 0");
+        break;
+      case 'pgsql':
+        db_change_column($ret, 'stormattribute', "weight", "weight", 'int', array('not null' => FALSE, 'default' => 0, 'size' => 'small'));
+        break;
+    }
+  }
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6201) {
+    db_add_index($return, 'stormattribute', 'domain', array('domain'));
+  }
+
+  return $ret;
+}
diff --git a/stormattribute/stormattribute.install b/stormattribute/stormattribute.install
deleted file mode 100644
index 28f4bf8..0000000
--- a/stormattribute/stormattribute.install
+++ /dev/null
@@ -1,1006 +0,0 @@
-<?php
-
-/**
- * @file
- */
-
-function stormattribute_install() {
-  drupal_install_schema('stormattribute');
-
-  $attributes = array();
-
-  $attributes['Price mode'] = array(
-    'not applicable' => 'Not Applicable',
-    'hourly' => 'Hourly',
-    'daily' => 'Daily',
-    'fixed_price' => 'Fixed Price',
-  );
-
-  $attributes['Project status'] = array(
-    'inserted' => 'inserted',
-    'in progress' => 'in progress',
-    'on hold' => 'on hold',
-    'completed' => 'completed'
-  );
-
-  $attributes['Project status search'] = array(
-    '-' => 'all',
-    'inserted,in progress,on hold' => 'open',
-    'inserted' => '-- inserted',
-    'in progress' => '-- in progress',
-    'on hold' => '-- on hold',
-    'completed' => 'completed'
-  );
-
-  $attributes['Project category'] = array(
-    'development' => 'development',
-    'support' => 'support',
-  );
-
-  $attributes['Project category search'] = array(
-    '-' => 'all',
-    'development' => 'development',
-    'support' => 'support',
-  );
-  
-  $attributes['Project priority'] = array(
-    '1-low' => 'low',
-    '2-normal' => 'normal',
-    '3-high' => 'high',
-    '4-urgent' => 'urgent'
-  );
-
-  $attributes['Project priority search'] = array(
-    '-' => 'all',
-    '1-low' => 'low',
-    '2-normal' => 'normal',
-    '3-high' => 'high',
-    '4-urgent' => 'urgent'
-  );
-
-  $attributes['Task status'] = array(
-    'inserted' => 'inserted',
-    'in progress' => 'in progress',
-    'on hold' => 'on hold',
-    'completed' => 'completed'
-  );
-
-  $attributes['Task status search'] = array(
-    '-' => 'all',
-    'inserted,in progress,on hold' => 'open',
-    'inserted' => '-- inserted',
-    'in progress' => '-- in progress',
-    'on hold' => '-- on hold',
-    'completed' => 'completed'
-  );
-
-  $attributes['Task category'] = array(
-    'bug' => 'bug',
-    'feature request' => 'feature request',
-    'support' => 'support',
-    'task' => 'task'
-  );
-
-  $attributes['Task priority'] = array(
-    '1-low' => 'low',
-    '2-normal' => 'normal',
-    '3-high' => 'high',
-    '4-urgent' => 'urgent'
-  );
-
-  $attributes['Task priority search'] = array(
-    '-' => 'all',
-    '1-low' => 'low',
-    '2-normal' => 'normal',
-    '3-high' => 'high',
-    '4-urgent' => 'urgent'
-  );
-
-  $attributes['Task category search'] = array(
-    '-' => 'all',
-    'bug' => 'bug',
-    'feature request' => 'feature request',
-    'support' => 'support',
-    'task' => 'task'
-  );
-
-  $attributes['Ticket status'] = array(
-    'inserted' => 'inserted',
-    'in progress' => 'in progress',
-    'on hold' => 'on hold',
-    'completed' => 'completed'
-  );
-
-  $attributes['Ticket status search'] = array(
-    '-' => 'all',
-    'inserted,in progress,on hold' => 'open',
-    'inserted' => '-- inserted',
-    'in progress' => '-- in progress',
-    'on hold' => '-- on hold',
-    'completed' => 'completed'
-  );
-
-  $attributes['Ticket category'] = array(
-    'estimate' => 'estimate',
-    'bug' => 'bug',
-    'feature request' => 'feature request',
-    'support' => 'support',
-    'task' => 'task'
-  );
-
-  $attributes['Ticket category search'] = array(
-    '-' => 'all',
-    'estimate' => 'estimate',
-    'bug' => 'bug',
-    'feature request' => 'feature request',
-    'support' => 'support',
-    'task' => 'task'
-  );
-
-  $attributes['Ticket priority'] = array(
-    '1-low' => 'low',
-    '2-normal' => 'normal',
-    '3-high' => 'high',
-    '4-urgent' => 'urgent'
-  );
-
-  $attributes['Ticket priority search'] = array(
-    '-' => 'all',
-    '1-low' => 'low',
-    '2-normal' => 'normal',
-    '3-high' => 'high',
-    '4-urgent' => 'urgent'
-  );
-
-  $attributes['Currency'] = array(
-    'USD' => 'US Dollar',
-    'CAD' => 'Canadian Dollar',
-    'EUR' => 'Euro',
-    'GBP' => 'British Pound',
-    'JPY' => 'Japanese Yen',
-    'CHF' => 'Swiss Franc',
-  );
-
-  $attributes['Country'] = array(
-    'US' => 'United States of America',
-    'AD' => 'Andorra',
-    'AE' => 'United Arab Emirates',
-    'AF' => 'Afghanistan',
-    'AG' => 'Antigua and Barbuda',
-    'AI' => 'Anguilla',
-    'AL' => 'Albania',
-    'AM' => 'Armenia',
-    'AN' => 'Netherlands Antilles',
-    'AO' => 'Angola',
-    'AR' => 'Argentina',
-    'AS' => 'American Samoa',
-    'AT' => 'Austria',
-    'AU' => 'Australia',
-    'AW' => 'Aruba',
-    'AX' => 'Åland Islands',
-    'AZ' => 'Azerbaijan',
-    'BA' => 'Bosnia and Herzegovina',
-    'BB' => 'Barbados',
-    'BD' => 'Bangladesh',
-    'BE' => 'Belgium',
-    'BF' => 'Burkina Faso',
-    'BG' => 'Bulgaria',
-    'BH' => 'Bahrain',
-    'BI' => 'Burundi',
-    'BJ' => 'Benin',
-    'BL' => 'Saint-Barthélemy',
-    'BM' => 'Bermuda',
-    'BN' => 'Brunei Darussalam',
-    'BO' => 'Bolivia',
-    'BR' => 'Brazil',
-    'BS' => 'Bahamas',
-    'BT' => 'Bhutan',
-    'BW' => 'Botswana',
-    'BY' => 'Belarus',
-    'BZ' => 'Belize',
-    'CA' => 'Canada',
-    'CD' => 'Democratic Republic of the Congo',
-    'CF' => 'Central African Republic',
-    'CG' => 'Congo',
-    'CH' => 'Switzerland',
-    'CI' => "Côte d'Ivoire",
-    'CK' => 'Cook Islands',
-    'CL' => 'Chile',
-    'CM' => 'Cameroon',
-    'CN' => 'China',
-    'CO' => 'Colombia',
-    'CR' => 'Costa Rica',
-    'CU' => 'Cuba',
-    'CV' => 'Cape Verde',
-    'CY' => 'Cyprus',
-    'CZ' => 'Czech Republic',
-    'DE' => 'Germany',
-    'DJ' => 'Djibouti',
-    'DK' => 'Denmark',
-    'DM' => 'Dominica',
-    'DO' => 'Dominican Republic',
-    'DZ' => 'Algeria',
-    'EC' => 'Ecuador',
-    'EE' => 'Estonia',
-    'EG' => 'Egypt',
-    'EH' => 'Western Sahara',
-    'ER' => 'Eritrea',
-    'ES' => 'Spain',
-    'ET' => 'Ethiopia',
-    'FI' => 'Finland',
-    'FJ' => 'Fiji',
-    'FK' => 'Falkland Islands (Malvinas)',
-    'FM' => 'Micronesia, Federated States of',
-    'FO' => 'Faeroe Islands',
-    'FR' => 'France',
-    'GA' => 'Gabon',
-    'GB' => 'United Kingdom',
-    'GD' => 'Grenada',
-    'GE' => 'Georgia',
-    'GF' => 'French Guiana',
-    'GG' => 'Guernsey',
-    'GH' => 'Ghana',
-    'GI' => 'Gibraltar',
-    'GL' => 'Greenland',
-    'GM' => 'Gambia',
-    'GN' => 'Guinea',
-    'GP' => 'Guadeloupe',
-    'GQ' => 'Equatorial Guinea',
-    'GR' => 'Greece',
-    'GT' => 'Guatemala',
-    'GU' => 'Guam',
-    'GW' => 'Guinea-Bissau',
-    'GY' => 'Guyana',
-    'HK' => 'Hong Kong Special Administrative Region of China',
-    'HN' => 'Honduras',
-    'HR' => 'Croatia',
-    'HT' => 'Haiti',
-    'HU' => 'Hungary',
-    'ID' => 'Indonesia',
-    'IE' => 'Ireland',
-    'IL' => 'Israel',
-    'IM' => 'Isle of Man',
-    'IN' => 'India',
-    'IQ' => 'Iraq, Republic of',
-    'IR' => 'Iran, Islamic Republic of',
-    'IS' => 'Iceland',
-    'IT' => 'Italy',
-    'JE' => 'Jersey',
-    'JM' => 'Jamaica',
-    'JO' => 'Jordan',
-    'JP' => 'Japan',
-    'KE' => 'Kenya',
-    'KG' => 'Kyrgyzstan',
-    'KH' => 'Cambodia',
-    'KI' => 'Kiribati',
-    'KM' => 'Comoros',
-    'KN' => 'Saint Kitts and Nevis',
-    'KP' => "Democratic People's Republic of Korea",
-    'KR' => 'Republic of Korea',
-    'KW' => 'Kuwait',
-    'KY' => 'Cayman Islands',
-    'KZ' => 'Kazakhstan',
-    'LA' => "Lao People's Democratic Republic",
-    'LB' => 'Lebanon',
-    'LC' => 'Saint Lucia',
-    'LI' => 'Liechtenstein',
-    'LK' => 'Sri Lanka',
-    'LR' => 'Liberia',
-    'LS' => 'Lesotho',
-    'LT' => 'Lithuania',
-    'LU' => 'Luxembourg',
-    'LV' => 'Latvia',
-    'LY' => 'Libyan Arab Jamahiriya',
-    'MA' => 'Morocco',
-    'MC' => 'Monaco',
-    'MD' => 'Moldova',
-    'ME' => 'Montenegro',
-    'MF' => 'Saint-Martin (French part)',
-    'MG' => 'Madagascar',
-    'MH' => 'Marshall Islands',
-    'MK' => 'The former Yugoslav Republic of Macedonia',
-    'ML' => 'Mali',
-    'MM' => 'Myanmar',
-    'MN' => 'Mongolia',
-    'MO' => 'Macao Special Administrative Region of China',
-    'MP' => 'Northern Mariana Islands',
-    'MQ' => 'Martinique',
-    'MR' => 'Mauritania',
-    'MS' => 'Montserrat',
-    'MT' => 'Malta',
-    'MU' => 'Mauritius',
-    'MV' => 'Maldives',
-    'MW' => 'Malawi',
-    'MX' => 'Mexico',
-    'MY' => 'Malaysia',
-    'MZ' => 'Mozambique',
-    'NA' => 'Namibia',
-    'NC' => 'New Caledonia',
-    'NE' => 'Niger',
-    'NF' => 'Norfolk Island',
-    'NG' => 'Nigeria',
-    'NI' => 'Nicaragua',
-    'NL' => 'Netherlands',
-    'NO' => 'Norway',
-    'NP' => 'Nepal',
-    'NR' => 'Nauru',
-    'NU' => 'Niue',
-    'NZ' => 'New Zealand',
-    'OM' => 'Oman',
-    'PA' => 'Panama',
-    'PE' => 'Peru',
-    'PF' => 'French Polynesia',
-    'PG' => 'Papua New Guinea',
-    'PH' => 'Philippines',
-    'PK' => 'Pakistan',
-    'PL' => 'Poland',
-    'PM' => 'Saint Pierre and Miquelon',
-    'PN' => 'Pitcairn',
-    'PR' => 'Puerto Rico',
-    'PS' => 'Occupied Palestinian Territory',
-    'PT' => 'Portugal',
-    'PW' => 'Palau',
-    'PY' => 'Paraguay',
-    'QA' => 'Qatar',
-    'RE' => 'Réunion',
-    'RO' => 'Romania',
-    'RS' => 'Serbia',
-    'RU' => 'Russian Federation',
-    'RW' => 'Rwanda',
-    'SA' => 'Saudi Arabia',
-    'SB' => 'Solomon Islands',
-    'SC' => 'Seychelles',
-    'SD' => 'Sudan',
-    'SE' => 'Sweden',
-    'SG' => 'Singapore',
-    'SH' => 'Saint Helena',
-    'SI' => 'Slovenia',
-    'SJ' => 'Svalbard and Jan Mayen Islands',
-    'SK' => 'Slovakia',
-    'SL' => 'Sierra Leone',
-    'SM' => 'San Marino',
-    'SN' => 'Senegal',
-    'SO' => 'Somalia',
-    'SR' => 'Suriname',
-    'ST' => 'Sao Tome and Principe',
-    'SV' => 'El Salvador',
-    'SY' => 'Syrian Arab Republic',
-    'SZ' => 'Swaziland',
-    'TC' => 'Turks and Caicos Islands',
-    'TD' => 'Chad',
-    'TG' => 'Togo',
-    'TH' => 'Thailand',
-    'TJ' => 'Tajikistan',
-    'TK' => 'Tokelau',
-    'TL' => 'Timor-Leste',
-    'TM' => 'Turkmenistan',
-    'TN' => 'Tunisia',
-    'TO' => 'Tonga',
-    'TR' => 'Turkey',
-    'TT' => 'Trinidad and Tobago',
-    'TV' => 'Tuvalu',
-    'TZ' => 'United Republic of Tanzania',
-    'UA' => 'Ukraine',
-    'UG' => 'Uganda',
-    'UY' => 'Uruguay',
-    'UZ' => 'Uzbekistan',
-    'VA' => 'Holy See',
-    'VC' => 'Saint Vincent and the Grenadines',
-    'VE' => 'Venezuela (Bolivarian Republic of)',
-    'VG' => 'British Virgin Islands',
-    'VI' => 'United States Virgin Islands',
-    'VN' => 'Viet Nam',
-    'VU' => 'Vanuatu',
-    'WF' => 'Wallis and Futuna Islands',
-    'WS' => 'Samoa',
-    'YE' => 'Yemen',
-    'YT' => 'Mayotte',
-    'ZA' => 'South Africa',
-    'ZM' => 'Zambia',
-    'ZW' => 'Zimbabwe',
-  );
-
-  $attributes['Knowledge base topic'] = array(
-    'OS' => 'Operating systems',
-    'Linux'=>'-- Linux',
-    'Ubuntu'=>'-- Ubuntu',
-    'DB' => 'Databases',
-    'MySQL'=>'-- MySQL',
-    'PostgreSQL'=>'-- PostgreSQL',
-  );
-
-  $attributes['Duration unit'] = array(
-    'hour' => 'Hour',
-    'day' => 'Day',
-  );
-
-  $attributes['Expense status'] = array(
-    'outstanding' => 'Outstanding',
-    'paid' => 'Paid',
-  );
-  
-  $attributes['Expense status search'] = array(
-    'outstanding' => 'Outstanding',
-    'paid' => 'Paid',
-  );
-
-  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
-  $prevdomain = '';
-  $weight = 0;
-  foreach ($attributes as $domain => $attribute) {
-    if ($domain != $prevdomain) $weight=0;
-    foreach ($attribute as $key => $value) {
-      db_query($s, $domain, $key, $value, $weight);
-      $weight++;
-    }
-    $prevdomain = $domain;
-  }
-
-  db_query("UPDATE {stormattribute} SET isdefault = 1 WHERE domain = 'Task category' and akey = 'task'");
-}
-
-function stormattribute_uninstall() {
-  drupal_uninstall_schema('stormattribute');
-}
-
-function stormattribute_schema() {
-  $schema['stormattribute'] = array(
-    'fields'          => array(
-      'aid'           => array('type' => 'serial', 'not null' => TRUE),
-      'domain'        => array('type' => 'varchar', 'length' => 100),
-      'akey'          => array('type' => 'varchar', 'length' => 100),
-      'avalue'        => array('type' => 'varchar', 'length' => 100),
-      'parent_domain' => array('type' => 'varchar', 'length' => 100),
-      'weight'        => array('type' => 'int','not null' => FALSE, 'default' => 0, 'size' => 'small'),
-      'isdefault'     => array('type' => 'int','not null' => FALSE, 'default' => 0, 'size' => 'tiny'),
-      'isactive'      => array('type' => 'int','not null' => FALSE, 'default' => 1, 'size' => 'tiny'),
-    ),
-    'primary key' => array('aid'),
-    'indexes' => array(
-      'domain'        => array('domain'),
-    ),
-  );
-
-  return $schema;
-}
-
-function stormattribute_update_1() {
-  $attributes = array();
-
-  $attributes['Project priority'] = array(
-    '1-low' => 'low',
-    '2-normal' => 'normal',
-    '3-high' => 'high',
-    '4-urgent' => 'urgent'
-  );
-
-  $attributes['Project priority search'] = array(
-    '1-low' => 'low',
-    '2-normal' => 'normal',
-    '3-high' => 'high',
-    '4-urgent' => 'urgent'
-  );
-
-  $attributes['Task category'] = array(
-    'bug' => 'bug',
-    'feature request' => 'feature request',
-    'support' => 'support',
-    'task' => 'task'
-  );
-
-  $attributes['Task priority'] = array(
-    '1-low' => 'low',
-    '2-normal' => 'normal',
-    '3-high' => 'high',
-    '4-urgent' => 'urgent'
-  );
-
-  $attributes['Task priority search'] = array(
-    '1-low' => 'low',
-    '2-normal' => 'normal',
-    '3-high' => 'high',
-    '4-urgent' => 'urgent'
-  );
-
-  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
-  $prevdomain = '';
-  $weight = 0;
-  foreach ($attributes as $domain => $attribute) {
-    if ($domain != $prevdomain) $weight=0;
-    foreach ($attribute as $key => $value) {
-      db_query($s, $domain, $key, $value, $weight);
-      $weight++;
-    }
-    $prevdomain = $domain;
-  }
-  $ret = array();
-  return $ret;
-}
-
-function stormattribute_update_2() {
-  $attributes['Currency'] = array(
-    'USD' => 'US Dollar',
-    'CAD' => 'Canadian Dollar',
-    'EUR' => 'Euro',
-    'GBP' => 'British Pound',
-    'JPY' => 'Japanese Yen',
-    'CHF' => 'Swiss Franc',
-  );
-
-  $attributes['Country'] = array(
-    'AD' => 'Andorra',
-    'AE' => 'United Arab Emirates',
-    'AF' => 'Afghanistan',
-    'AG' => 'Antigua and Barbuda',
-    'AI' => 'Anguilla',
-    'AL' => 'Albania',
-    'AM' => 'Armenia',
-    'AN' => 'Netherlands Antilles',
-    'AO' => 'Angola',
-    'AR' => 'Argentina',
-    'AS' => 'American Samoa',
-    'AT' => 'Austria',
-    'AU' => 'Australia',
-    'AW' => 'Aruba',
-    'AX' => 'Åland Islands',
-    'AZ' => 'Azerbaijan',
-    'BA' => 'Bosnia and Herzegovina',
-    'BB' => 'Barbados',
-    'BD' => 'Bangladesh',
-    'BE' => 'Belgium',
-    'BF' => 'Burkina Faso',
-    'BG' => 'Bulgaria',
-    'BH' => 'Bahrain',
-    'BI' => 'Burundi',
-    'BJ' => 'Benin',
-    'BL' => 'Saint-Barthélemy',
-    'BM' => 'Bermuda',
-    'BN' => 'Brunei Darussalam',
-    'BO' => 'Bolivia',
-    'BR' => 'Brazil',
-    'BS' => 'Bahamas',
-    'BT' => 'Bhutan',
-    'BW' => 'Botswana',
-    'BY' => 'Belarus',
-    'BZ' => 'Belize',
-    'CA' => 'Canada',
-    'CD' => 'Democratic Republic of the Congo',
-    'CF' => 'Central African Republic',
-    'CG' => 'Congo',
-    'CH' => 'Switzerland',
-    'CI' => "Côte d'Ivoire",
-    'CK' => 'Cook Islands',
-    'CL' => 'Chile',
-    'CM' => 'Cameroon',
-    'CN' => 'China',
-    'CO' => 'Colombia',
-    'CR' => 'Costa Rica',
-    'CU' => 'Cuba',
-    'CV' => 'Cape Verde',
-    'CY' => 'Cyprus',
-    'CZ' => 'Czech Republic',
-    'DE' => 'Germany',
-    'DJ' => 'Djibouti',
-    'DK' => 'Denmark',
-    'DM' => 'Dominica',
-    'DO' => 'Dominican Republic',
-    'DZ' => 'Algeria',
-    'EC' => 'Ecuador',
-    'EE' => 'Estonia',
-    'EG' => 'Egypt',
-    'EH' => 'Western Sahara',
-    'ER' => 'Eritrea',
-    'ES' => 'Spain',
-    'ET' => 'Ethiopia',
-    'FI' => 'Finland',
-    'FJ' => 'Fiji',
-    'FK' => 'Falkland Islands (Malvinas)',
-    'FM' => 'Micronesia, Federated States of',
-    'FO' => 'Faeroe Islands',
-    'FR' => 'France',
-    'GA' => 'Gabon',
-    'GB' => 'United Kingdom of Great Britain and Northern Ireland',
-    'GD' => 'Grenada',
-    'GE' => 'Georgia',
-    'GF' => 'French Guiana',
-    'GG' => 'Guernsey',
-    'GH' => 'Ghana',
-    'GI' => 'Gibraltar',
-    'GL' => 'Greenland',
-    'GM' => 'Gambia',
-    'GN' => 'Guinea',
-    'GP' => 'Guadeloupe',
-    'GQ' => 'Equatorial Guinea',
-    'GR' => 'Greece',
-    'GT' => 'Guatemala',
-    'GU' => 'Guam',
-    'GW' => 'Guinea-Bissau',
-    'GY' => 'Guyana',
-    'HK' => 'Hong Kong Special Administrative Region of China',
-    'HN' => 'Honduras',
-    'HR' => 'Croatia',
-    'HT' => 'Haiti',
-    'HU' => 'Hungary',
-    'ID' => 'Indonesia',
-    'IE' => 'Ireland',
-    'IL' => 'Israel',
-    'IM' => 'Isle of Man',
-    'IN' => 'India',
-    'IQ' => 'Iraq, Republic of',
-    'IR' => 'Iran, Islamic Republic of',
-    'IS' => 'Iceland',
-    'IT' => 'Italy',
-    'JE' => 'Jersey',
-    'JM' => 'Jamaica',
-    'JO' => 'Jordan',
-    'JP' => 'Japan',
-    'KE' => 'Kenya',
-    'KG' => 'Kyrgyzstan',
-    'KH' => 'Cambodia',
-    'KI' => 'Kiribati',
-    'KM' => 'Comoros',
-    'KN' => 'Saint Kitts and Nevis',
-    'KP' => "Democratic People's Republic of Korea",
-    'KR' => 'Republic of Korea',
-    'KW' => 'Kuwait',
-    'KY' => 'Cayman Islands',
-    'KZ' => 'Kazakhstan',
-    'LA' => "Lao People's Democratic Republic",
-    'LB' => 'Lebanon',
-    'LC' => 'Saint Lucia',
-    'LI' => 'Liechtenstein',
-    'LK' => 'Sri Lanka',
-    'LR' => 'Liberia',
-    'LS' => 'Lesotho',
-    'LT' => 'Lithuania',
-    'LU' => 'Luxembourg',
-    'LV' => 'Latvia',
-    'LY' => 'Libyan Arab Jamahiriya',
-    'MA' => 'Morocco',
-    'MC' => 'Monaco',
-    'MD' => 'Moldova',
-    'ME' => 'Montenegro',
-    'MF' => 'Saint-Martin (French part)',
-    'MG' => 'Madagascar',
-    'MH' => 'Marshall Islands',
-    'MK' => 'The former Yugoslav Republic of Macedonia',
-    'ML' => 'Mali',
-    'MM' => 'Myanmar',
-    'MN' => 'Mongolia',
-    'MO' => 'Macao Special Administrative Region of China',
-    'MP' => 'Northern Mariana Islands',
-    'MQ' => 'Martinique',
-    'MR' => 'Mauritania',
-    'MS' => 'Montserrat',
-    'MT' => 'Malta',
-    'MU' => 'Mauritius',
-    'MV' => 'Maldives',
-    'MW' => 'Malawi',
-    'MX' => 'Mexico',
-    'MY' => 'Malaysia',
-    'MZ' => 'Mozambique',
-    'NA' => 'Namibia',
-    'NC' => 'New Caledonia',
-    'NE' => 'Niger',
-    'NF' => 'Norfolk Island',
-    'NG' => 'Nigeria',
-    'NI' => 'Nicaragua',
-    'NL' => 'Netherlands',
-    'NO' => 'Norway',
-    'NP' => 'Nepal',
-    'NR' => 'Nauru',
-    'NU' => 'Niue',
-    'NZ' => 'New Zealand',
-    'OM' => 'Oman',
-    'PA' => 'Panama',
-    'PE' => 'Peru',
-    'PF' => 'French Polynesia',
-    'PG' => 'Papua New Guinea',
-    'PH' => 'Philippines',
-    'PK' => 'Pakistan',
-    'PL' => 'Poland',
-    'PM' => 'Saint Pierre and Miquelon',
-    'PN' => 'Pitcairn',
-    'PR' => 'Puerto Rico',
-    'PS' => 'Occupied Palestinian Territory',
-    'PT' => 'Portugal',
-    'PW' => 'Palau',
-    'PY' => 'Paraguay',
-    'QA' => 'Qatar',
-    'RE' => 'Réunion',
-    'RO' => 'Romania',
-    'RS' => 'Serbia',
-    'RU' => 'Russian Federation',
-    'RW' => 'Rwanda',
-    'SA' => 'Saudi Arabia',
-    'SB' => 'Solomon Islands',
-    'SC' => 'Seychelles',
-    'SD' => 'Sudan',
-    'SE' => 'Sweden',
-    'SG' => 'Singapore',
-    'SH' => 'Saint Helena',
-    'SI' => 'Slovenia',
-    'SJ' => 'Svalbard and Jan Mayen Islands',
-    'SK' => 'Slovakia',
-    'SL' => 'Sierra Leone',
-    'SM' => 'San Marino',
-    'SN' => 'Senegal',
-    'SO' => 'Somalia',
-    'SR' => 'Suriname',
-    'ST' => 'Sao Tome and Principe',
-    'SV' => 'El Salvador',
-    'SY' => 'Syrian Arab Republic',
-    'SZ' => 'Swaziland',
-    'TC' => 'Turks and Caicos Islands',
-    'TD' => 'Chad',
-    'TG' => 'Togo',
-    'TH' => 'Thailand',
-    'TJ' => 'Tajikistan',
-    'TK' => 'Tokelau',
-    'TL' => 'Timor-Leste',
-    'TM' => 'Turkmenistan',
-    'TN' => 'Tunisia',
-    'TO' => 'Tonga',
-    'TR' => 'Turkey',
-    'TT' => 'Trinidad and Tobago',
-    'TV' => 'Tuvalu',
-    'TZ' => 'United Republic of Tanzania',
-    'UA' => 'Ukraine',
-    'UG' => 'Uganda',
-    'UY' => 'Uruguay',
-    'US' => 'United States of America',
-    'UZ' => 'Uzbekistan',
-    'VA' => 'Holy See',
-    'VC' => 'Saint Vincent and the Grenadines',
-    'VE' => 'Venezuela (Bolivarian Republic of)',
-    'VG' => 'British Virgin Islands',
-    'VI' => 'United States Virgin Islands',
-    'VN' => 'Viet Nam',
-    'VU' => 'Vanuatu',
-    'WF' => 'Wallis and Futuna Islands',
-    'WS' => 'Samoa',
-    'YE' => 'Yemen',
-    'YT' => 'Mayotte',
-    'ZA' => 'South Africa',
-    'ZM' => 'Zambia',
-    'ZW' => 'Zimbabwe',
-  );
-  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
-  $prevdomain = '';
-  $weight = 0;
-  foreach ($attributes as $domain => $attribute) {
-    if ($domain != $prevdomain) $weight=0;
-    foreach ($attribute as $key => $value) {
-      db_query($s, $domain, $key, $value, $weight);
-      $weight++;
-    }
-    $prevdomain = $domain;
-  }
-  $ret = array();
-  return $ret;
-}
-
-function stormattribute_update_3() {
-  $attributes['Knowledge base topic'] = array(
-    'OS' => 'Operating systems',
-    'Linux'=>'-- Linux',
-    'Ubuntu'=>'-- Ubuntu',
-    'DB' => 'Databases',
-    'MySQL'=>'-- MySQL',
-    'PostgreSQL'=>'-- PostgreSQL',
-  );
-
-  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
-  $prevdomain = '';
-  $weight = 0;
-  foreach ($attributes as $domain => $attribute) {
-    if ($domain != $prevdomain) $weight=0;
-    foreach ($attribute as $key => $value) {
-      db_query($s, $domain, $key, $value, $weight);
-      $weight++;
-    }
-    $prevdomain = $domain;
-  }
-
-  $ret = array();
-  return $ret;
-}
-
-function stormattribute_update_4() {
-  $attributes['Duration unit'] = array(
-    'hour' => 'Hour',
-    'day' => 'Day',
-  );
-
-  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
-  $prevdomain = '';
-  $weight = 0;
-  foreach ($attributes as $domain => $attribute) {
-    if ($domain != $prevdomain) $weight=0;
-    foreach ($attribute as $key => $value) {
-      db_query($s, $domain, $key, $value, $weight);
-      $weight++;
-    }
-    $prevdomain = $domain;
-  }
-
-  $ret = array();
-  return $ret;
-}
-
-function stormattribute_update_5() {
-  $attributes['Ticket category search'] = array(
-    'bug' => 'bug',
-    'feature request' => 'feature request',
-    'support' => 'support',
-    'task' => 'task'
-  );
-
-  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
-  $prevdomain = '';
-  $weight = 0;
-  foreach ($attributes as $domain => $attribute) {
-    if ($domain != $prevdomain) $weight=0;
-    foreach ($attribute as $key => $value) {
-      db_query($s, $domain, $key, $value, $weight);
-      $weight++;
-    }
-    $prevdomain = $domain;
-  }
-
-  $ret = array();
-  db_add_field($ret, 'stormattribute', 'parent_domain', array('type' => 'varchar', 'length' => 100));
-  db_add_field($ret, 'stormattribute', 'isactive', array('type' => 'int','not null' => FALSE, 'default' => 1, 'size' => 'tiny'));
-  db_add_field($ret, 'stormattribute', 'isdefault', array('type' => 'int','not null' => FALSE, 'default' => 0, 'size' => 'tiny'));
-  return $ret;
-}
-
-function stormattribute_update_6() {
-  $ret = array();
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      $ret[] = update_sql("ALTER TABLE {stormattribute} CHANGE COLUMN weight weight SMALLINT NOT NULL default 0");
-      break;
-    case 'pgsql':
-      db_change_column($ret, 'stormattribute', "weight", "weight", 'int', array('not null' => FALSE, 'default' => 0, 'size' => 'small'));
-      break;
-  }
-
-
-  $attributes['Task category search'] = array(
-    '-' => 'all',
-    'bug' => 'bug',
-    'feature request' => 'feature request',
-    'support' => 'support',
-    'task' => 'task'
-  );
-
-  $attributes['Project status search'] = array('-' => 'all');
-  $attributes['Project priority search'] = array('-' => 'all');
-  $attributes['Task status search'] = array('-' => 'all');
-  $attributes['Task priority search'] = array('-' => 'all');
-  $attributes['Ticket status search'] = array('-' => 'all');
-  $attributes['Ticket category search'] = array('-' => 'all');
-  $attributes['Ticket priority search'] = array('-' => 'all');
-
-  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('%s', '%s', '%s', %d, 1)";
-  $prevdomain = '';
-  $weight = 0;
-  foreach ($attributes as $domain => $attribute) {
-    if ($domain != $prevdomain) $weight=0;
-    foreach ($attribute as $key => $value) {
-      db_query($s, $domain, $key, $value, $weight);
-      $weight++;
-    }
-    $prevdomain = $domain;
-  }
-
-  return $ret;
-}
-
-function stormattribute_update_6107(){
-  // Updated numbering to use Drupal standard format. See also http://api.drupal.org/api/function/hook_update_N/6
-  $ret = array();
-
-  $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Project category search', 'development', 'development', 0, 1)");
-  $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Project category search', 'support', 'support', 0, 1)");
-    
-  return $ret;
-}
-
-function stormattribute_update_6108(){
-  
-  $attributes['Expense status'] = array(
-    'outstanding' => 'Outstanding',
-    'paid' => 'Paid',
-  );
-    
-  $attributes['Expense status search'] = array(
-    'outstanding' => 'Outstanding',
-    'paid' => 'Paid',
-  );
-
-  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('%s', '%s', '%s', %d, 1)";
-  $prevdomain = '';
-  $weight = 0;
-  foreach ($attributes as $domain => $attribute) {
-    if ($domain != $prevdomain) $weight=0;
-    foreach ($attribute as $key => $value) {
-      db_query($s, $domain, $key, $value, $weight);
-      $weight++;
-    }
-    $prevdomain = $domain;
-  }
-
-  return $ret;
-}
-
-function stormattribute_update_6109() {
-  $ret = array();
-
-  $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Project category search', '-', 'all', 0, 1)");
-
-  return $ret;  
-}
-
-function stormattribute_update_6110() {
-  $ret = array();
-
-  $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Price mode', 'not applicable', 'Not Applicable', 0, 1)");
-
-  return $ret;  
-}
-
-
-/**
- * Added fixed_timetracking attribute for issue 735694
-*/
-function stormattribute_update_6111() {
-  $ret = array();
-
-  $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Price mode', 'fixed_timetracking', 'Fixed Timetracking', 0, 1)");
-
-  return $ret;
-}
-
-/**
- * Added more fixed attributes for issue 567558
- * Converting all fixed_timetracking into fixed_price to make the function general for all Storm node types
-*/
-function stormattribute_update_6112() {
-  $ret = array();
-
-  $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Price mode', 'fixed_price', 'Fixed Price', 0, 1)");
-  
-  if (module_exists('stormorganization')) {
-    $ret[] = update_sql("UPDATE {stormorganization} set pricemode='fixed_price' where pricemode='fixed_timetracking'");
-    drupal_set_message(t('Nodes of type "Organization" have been updated - pricemode changed from fixed_timetracking to fixed_price.'), 'warning');
-  }
-
-  if (module_exists('stormproject')) {
-    $ret[] = update_sql("UPDATE {stormproject} set pricemode='fixed_price' where pricemode='fixed_timetracking'");
-    drupal_set_message(t('Nodes of type "Project" have been updated - pricemode changed from fixed_timetracking to fixed_price.'), 'warning');
-  }
-
-  if (module_exists('stormtask')) {
-    $ret[] = update_sql("UPDATE {stormtask} set pricemode='fixed_price' where pricemode='fixed_timetracking'");
-    drupal_set_message(t('Nodes of type "Task" have been updated - pricemode changed from fixed_timetracking to fixed_price.'), 'warning');
-  }
-
-  if (module_exists('stormticket')) {
-    $ret[] = update_sql("UPDATE {stormticket} set pricemode='fixed_price' where pricemode='fixed_timetracking'");
-    drupal_set_message(t('Nodes of type "Ticket" have been updated - pricemode changed from fixed_timetracking to fixed_price.'), 'warning');
-  }
-
-  $ret[] = update_sql("DELETE FROM {stormattribute} where domain = 'Price mode' and akey = 'fixed_timetracking'");
-
-  return $ret;
-}
-
-function stormattribute_update_6201() {
-  $return = array();
-  db_add_index($return, 'stormattribute', 'domain', array('domain'));
-  return $return;
-}
-
diff --git a/stormattribute/stormattribute.theme.inc b/stormattribute/stormattribute.theme.inc
index 8e70337..357f224 100644
--- a/stormattribute/stormattribute.theme.inc
+++ b/stormattribute/stormattribute.theme.inc
@@ -5,37 +5,40 @@ function theme_stormattribute_list($form) {
 
   $header = array();
   $row = array();
+  $rows = array();
 
   $header = $form['header']['#value'];
   unset($form['header']);
 
-  foreach (element_children($form['attributes']) as $key) {
-    $form['attributes'][$key]['attribute_weight_'. $key]['#attributes']['class'] = 'attribute-weight';
-    $domain = check_markup(drupal_render($form['attributes'][$key]['attribute_domain_'. $key]));
-    $isdefault = $form['attributes'][$key]['attribute_default_'. $key]['#default_value'];
-    if($isdefault) {
-      $ischecked = 'checked="checked"';
+  if(isset($form['attributes'])) {
+    foreach (element_children($form['attributes']) as $key) {
+      $form['attributes'][$key]['attribute_weight_'. $key]['#attributes']['class'] = 'attribute-weight';
+      $domain = check_markup(drupal_render($form['attributes'][$key]['attribute_domain_'. $key]));
+      $isdefault = $form['attributes'][$key]['attribute_default_'. $key]['#default_value'];
+      if($isdefault) {
+        $ischecked = 'checked="checked"';
+      }
+      else {
+        $ischecked = '';
+      }
+      $domain_name = 'attribute_default_'. str_replace(' ','|', $domain);
+      $default_ctl = '<input type="radio" name="'. $domain_name .'" value="'. $key .'" '. $ischecked .'"/>';
+      $data = array (
+        $domain,
+        check_markup(drupal_render($form['attributes'][$key]['attribute_akey_'. $key])),
+        check_markup(drupal_render($form['attributes'][$key]['attribute_avalue_'. $key])),
+        drupal_render($form['attributes'][$key]['attribute_isactive_'. $key]),
+        $default_ctl,
+        drupal_render($form['attributes'][$key]['attribute_weight_'. $key]),
+        array (
+          'data' => drupal_render($form['attributes'][$key]['attribute_operations_'. $key]),
+          'class' => 'storm_list_operations',
+        ),
+      );
+      $row['data'] = $data;
+      $row['class'] = empty($row['class']) ? 'draggable' : $row['class'] .' draggable';
+      $rows[] = $row;
     }
-    else {
-      $ischecked = '';
-    }
-    $domain_name = 'attribute_default_'. str_replace(' ','|', $domain);
-    $default_ctl = '<input type="radio" name="'. $domain_name .'" value="'. $key .'" '. $ischecked .'"/>';
-    $data = array (
-      $domain,
-      check_markup(drupal_render($form['attributes'][$key]['attribute_akey_'. $key])),
-      check_markup(drupal_render($form['attributes'][$key]['attribute_avalue_'. $key])),
-      drupal_render($form['attributes'][$key]['attribute_isactive_'. $key]),
-      $default_ctl,
-      drupal_render($form['attributes'][$key]['attribute_weight_'. $key]),
-      array (
-        'data' => drupal_render($form['attributes'][$key]['attribute_operations_'. $key]),
-        'class' => 'storm_list_operations',
-      ),
-    );
-    $row['data'] = $data;
-    $row['class'] = empty($row['class']) ? 'draggable' : $row['class'] .' draggable';
-    $rows[] = $row;
   }
   $o = theme('table', $header, $rows, array('id' => 'attributes'));
   return $o;
diff --git a/stormexpense/stormexpense.install b/stormexpense/stormexpense.install
index acdc822..a4bb931 100644
--- a/stormexpense/stormexpense.install
+++ b/stormexpense/stormexpense.install
@@ -7,6 +7,30 @@
 function stormexpense_install() {
   drupal_install_schema('stormexpense');
   variable_set('node_options_stormexpense', array('status'));
+
+  $attributes = array();
+
+  $attributes['Expense status'] = array(
+    'outstanding' => 'Outstanding',
+    'paid' => 'Paid',
+  );
+
+  $attributes['Expense status search'] = array(
+    'outstanding' => 'Outstanding',
+    'paid' => 'Paid',
+  );
+
+  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
+  $prevdomain = '';
+  $weight = 0;
+  foreach ($attributes as $domain => $attribute) {
+    if ($domain != $prevdomain) $weight=0;
+    foreach ($attribute as $key => $value) {
+      db_query($s, $domain, $key, $value, $weight);
+      $weight++;
+    }
+    $prevdomain = $domain;
+  }
 }
 
 function stormexpense_disable() {
@@ -99,4 +123,34 @@ function stormexpense_update_6201() {
     db_add_index($return, 'stormexpense', $name, $fields);
   }
   return $return;
-}
\ No newline at end of file
+}
+
+function stormexpense_update_6202() {
+  // Only run this update if was not previously run as part of the legacy stormattribute module
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6108) {
+    $attributes['Expense status'] = array(
+      'outstanding' => 'Outstanding',
+      'paid' => 'Paid',
+    );
+
+    $attributes['Expense status search'] = array(
+      'outstanding' => 'Outstanding',
+      'paid' => 'Paid',
+    );
+
+    $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('%s', '%s', '%s', %d, 1)";
+    $prevdomain = '';
+    $weight = 0;
+    foreach ($attributes as $domain => $attribute) {
+      if ($domain != $prevdomain) $weight=0;
+      foreach ($attribute as $key => $value) {
+        db_query($s, $domain, $key, $value, $weight);
+        $weight++;
+      }
+      $prevdomain = $domain;
+    }
+  }
+
+  $ret = array();
+  return $ret;
+}
diff --git a/stormknowledgebase/stormknowledgebase.install b/stormknowledgebase/stormknowledgebase.install
index 1598be9..5afee81 100644
--- a/stormknowledgebase/stormknowledgebase.install
+++ b/stormknowledgebase/stormknowledgebase.install
@@ -7,10 +7,35 @@
 function stormknowledgebase_install() {
   drupal_install_schema('stormknowledgebase');
   variable_set('node_options_stormknowledgebase', array('status'));
+
+  $attributes = array();
+
+  $attributes['Knowledge base topic'] = array(
+    'OS' => 'Operating systems',
+    'Linux'=>'-- Linux',
+    'Ubuntu'=>'-- Ubuntu',
+    'DB' => 'Databases',
+    'MySQL'=>'-- MySQL',
+    'PostgreSQL'=>'-- PostgreSQL',
+  );
+
+  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
+  $prevdomain = '';
+  $weight = 0;
+  foreach ($attributes as $domain => $attribute) {
+    if ($domain != $prevdomain) $weight=0;
+    foreach ($attribute as $key => $value) {
+      db_query($s, $domain, $key, $value, $weight);
+      $weight++;
+    }
+    $prevdomain = $domain;
+  }
 }
 
 function stormknowledgebase_disable() {
   drupal_set_message(t('Nodes of type "Knowledgebase" have not been deleted on disabling Storm Knowledgebase. Please note that they will now have reduced functionality, and will not be protected by Storm Knowledgebase access controls.'), 'warning');
+
+  db_query($s = "DELETE FROM {stormattribute} WHERE domain = 'Knowledge base topic'");
 }
 
 function stormknowledgebase_uninstall() {
@@ -59,3 +84,31 @@ function stormknowledgebase_update_6201() {
   db_add_index($return, 'stormknowledgebase', 'nid', array('nid'));
   return $return;
 }
+
+function stormknowledgebase_update_6202() {
+  // Only run this update if was not previously run as part of the legacy stormattribute module
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 3) {
+    $attributes['Knowledge base topic'] = array(
+      'OS' => 'Operating systems',
+      'Linux'=>'-- Linux',
+      'Ubuntu'=>'-- Ubuntu',
+      'DB' => 'Databases',
+      'MySQL'=>'-- MySQL',
+      'PostgreSQL'=>'-- PostgreSQL',
+    );
+
+    $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
+    $prevdomain = '';
+    $weight = 0;
+    foreach ($attributes as $domain => $attribute) {
+      if ($domain != $prevdomain) $weight=0;
+      foreach ($attribute as $key => $value) {
+        db_query($s, $domain, $key, $value, $weight);
+        $weight++;
+      }
+      $prevdomain = $domain;
+    }
+  }
+  $ret = array();
+  return $ret;
+}
diff --git a/stormorganization/stormorganization.install b/stormorganization/stormorganization.install
index 5e850d9..9a20ff7 100644
--- a/stormorganization/stormorganization.install
+++ b/stormorganization/stormorganization.install
@@ -7,6 +7,275 @@
 function stormorganization_install() {
   drupal_install_schema('stormorganization');
   variable_set('node_options_stormorganization', array('status'));
+
+  $attributes = array();
+
+  $attributes['Price mode'] = array(
+    'not applicable' => 'Not Applicable',
+    'hourly' => 'Hourly',
+    'daily' => 'Daily',
+    'fixed_price' => 'Fixed Price',
+  );
+
+  $attributes['Currency'] = array(
+    'USD' => 'US Dollar',
+    'CAD' => 'Canadian Dollar',
+    'EUR' => 'Euro',
+    'GBP' => 'British Pound',
+    'JPY' => 'Japanese Yen',
+    'CHF' => 'Swiss Franc',
+  );
+
+  $attributes['Country'] = array(
+    'US' => 'United States of America',
+    'AD' => 'Andorra',
+    'AE' => 'United Arab Emirates',
+    'AF' => 'Afghanistan',
+    'AG' => 'Antigua and Barbuda',
+    'AI' => 'Anguilla',
+    'AL' => 'Albania',
+    'AM' => 'Armenia',
+    'AN' => 'Netherlands Antilles',
+    'AO' => 'Angola',
+    'AR' => 'Argentina',
+    'AS' => 'American Samoa',
+    'AT' => 'Austria',
+    'AU' => 'Australia',
+    'AW' => 'Aruba',
+    'AX' => 'Åland Islands',
+    'AZ' => 'Azerbaijan',
+    'BA' => 'Bosnia and Herzegovina',
+    'BB' => 'Barbados',
+    'BD' => 'Bangladesh',
+    'BE' => 'Belgium',
+    'BF' => 'Burkina Faso',
+    'BG' => 'Bulgaria',
+    'BH' => 'Bahrain',
+    'BI' => 'Burundi',
+    'BJ' => 'Benin',
+    'BL' => 'Saint-Barthélemy',
+    'BM' => 'Bermuda',
+    'BN' => 'Brunei Darussalam',
+    'BO' => 'Bolivia',
+    'BR' => 'Brazil',
+    'BS' => 'Bahamas',
+    'BT' => 'Bhutan',
+    'BW' => 'Botswana',
+    'BY' => 'Belarus',
+    'BZ' => 'Belize',
+    'CA' => 'Canada',
+    'CD' => 'Democratic Republic of the Congo',
+    'CF' => 'Central African Republic',
+    'CG' => 'Congo',
+    'CH' => 'Switzerland',
+    'CI' => "Côte d'Ivoire",
+    'CK' => 'Cook Islands',
+    'CL' => 'Chile',
+    'CM' => 'Cameroon',
+    'CN' => 'China',
+    'CO' => 'Colombia',
+    'CR' => 'Costa Rica',
+    'CU' => 'Cuba',
+    'CV' => 'Cape Verde',
+    'CY' => 'Cyprus',
+    'CZ' => 'Czech Republic',
+    'DE' => 'Germany',
+    'DJ' => 'Djibouti',
+    'DK' => 'Denmark',
+    'DM' => 'Dominica',
+    'DO' => 'Dominican Republic',
+    'DZ' => 'Algeria',
+    'EC' => 'Ecuador',
+    'EE' => 'Estonia',
+    'EG' => 'Egypt',
+    'EH' => 'Western Sahara',
+    'ER' => 'Eritrea',
+    'ES' => 'Spain',
+    'ET' => 'Ethiopia',
+    'FI' => 'Finland',
+    'FJ' => 'Fiji',
+    'FK' => 'Falkland Islands (Malvinas)',
+    'FM' => 'Micronesia, Federated States of',
+    'FO' => 'Faeroe Islands',
+    'FR' => 'France',
+    'GA' => 'Gabon',
+    'GB' => 'United Kingdom',
+    'GD' => 'Grenada',
+    'GE' => 'Georgia',
+    'GF' => 'French Guiana',
+    'GG' => 'Guernsey',
+    'GH' => 'Ghana',
+    'GI' => 'Gibraltar',
+    'GL' => 'Greenland',
+    'GM' => 'Gambia',
+    'GN' => 'Guinea',
+    'GP' => 'Guadeloupe',
+    'GQ' => 'Equatorial Guinea',
+    'GR' => 'Greece',
+    'GT' => 'Guatemala',
+    'GU' => 'Guam',
+    'GW' => 'Guinea-Bissau',
+    'GY' => 'Guyana',
+    'HK' => 'Hong Kong Special Administrative Region of China',
+    'HN' => 'Honduras',
+    'HR' => 'Croatia',
+    'HT' => 'Haiti',
+    'HU' => 'Hungary',
+    'ID' => 'Indonesia',
+    'IE' => 'Ireland',
+    'IL' => 'Israel',
+    'IM' => 'Isle of Man',
+    'IN' => 'India',
+    'IQ' => 'Iraq, Republic of',
+    'IR' => 'Iran, Islamic Republic of',
+    'IS' => 'Iceland',
+    'IT' => 'Italy',
+    'JE' => 'Jersey',
+    'JM' => 'Jamaica',
+    'JO' => 'Jordan',
+    'JP' => 'Japan',
+    'KE' => 'Kenya',
+    'KG' => 'Kyrgyzstan',
+    'KH' => 'Cambodia',
+    'KI' => 'Kiribati',
+    'KM' => 'Comoros',
+    'KN' => 'Saint Kitts and Nevis',
+    'KP' => "Democratic People's Republic of Korea",
+    'KR' => 'Republic of Korea',
+    'KW' => 'Kuwait',
+    'KY' => 'Cayman Islands',
+    'KZ' => 'Kazakhstan',
+    'LA' => "Lao People's Democratic Republic",
+    'LB' => 'Lebanon',
+    'LC' => 'Saint Lucia',
+    'LI' => 'Liechtenstein',
+    'LK' => 'Sri Lanka',
+    'LR' => 'Liberia',
+    'LS' => 'Lesotho',
+    'LT' => 'Lithuania',
+    'LU' => 'Luxembourg',
+    'LV' => 'Latvia',
+    'LY' => 'Libyan Arab Jamahiriya',
+    'MA' => 'Morocco',
+    'MC' => 'Monaco',
+    'MD' => 'Moldova',
+    'ME' => 'Montenegro',
+    'MF' => 'Saint-Martin (French part)',
+    'MG' => 'Madagascar',
+    'MH' => 'Marshall Islands',
+    'MK' => 'The former Yugoslav Republic of Macedonia',
+    'ML' => 'Mali',
+    'MM' => 'Myanmar',
+    'MN' => 'Mongolia',
+    'MO' => 'Macao Special Administrative Region of China',
+    'MP' => 'Northern Mariana Islands',
+    'MQ' => 'Martinique',
+    'MR' => 'Mauritania',
+    'MS' => 'Montserrat',
+    'MT' => 'Malta',
+    'MU' => 'Mauritius',
+    'MV' => 'Maldives',
+    'MW' => 'Malawi',
+    'MX' => 'Mexico',
+    'MY' => 'Malaysia',
+    'MZ' => 'Mozambique',
+    'NA' => 'Namibia',
+    'NC' => 'New Caledonia',
+    'NE' => 'Niger',
+    'NF' => 'Norfolk Island',
+    'NG' => 'Nigeria',
+    'NI' => 'Nicaragua',
+    'NL' => 'Netherlands',
+    'NO' => 'Norway',
+    'NP' => 'Nepal',
+    'NR' => 'Nauru',
+    'NU' => 'Niue',
+    'NZ' => 'New Zealand',
+    'OM' => 'Oman',
+    'PA' => 'Panama',
+    'PE' => 'Peru',
+    'PF' => 'French Polynesia',
+    'PG' => 'Papua New Guinea',
+    'PH' => 'Philippines',
+    'PK' => 'Pakistan',
+    'PL' => 'Poland',
+    'PM' => 'Saint Pierre and Miquelon',
+    'PN' => 'Pitcairn',
+    'PR' => 'Puerto Rico',
+    'PS' => 'Occupied Palestinian Territory',
+    'PT' => 'Portugal',
+    'PW' => 'Palau',
+    'PY' => 'Paraguay',
+    'QA' => 'Qatar',
+    'RE' => 'Réunion',
+    'RO' => 'Romania',
+    'RS' => 'Serbia',
+    'RU' => 'Russian Federation',
+    'RW' => 'Rwanda',
+    'SA' => 'Saudi Arabia',
+    'SB' => 'Solomon Islands',
+    'SC' => 'Seychelles',
+    'SD' => 'Sudan',
+    'SE' => 'Sweden',
+    'SG' => 'Singapore',
+    'SH' => 'Saint Helena',
+    'SI' => 'Slovenia',
+    'SJ' => 'Svalbard and Jan Mayen Islands',
+    'SK' => 'Slovakia',
+    'SL' => 'Sierra Leone',
+    'SM' => 'San Marino',
+    'SN' => 'Senegal',
+    'SO' => 'Somalia',
+    'SR' => 'Suriname',
+    'ST' => 'Sao Tome and Principe',
+    'SV' => 'El Salvador',
+    'SY' => 'Syrian Arab Republic',
+    'SZ' => 'Swaziland',
+    'TC' => 'Turks and Caicos Islands',
+    'TD' => 'Chad',
+    'TG' => 'Togo',
+    'TH' => 'Thailand',
+    'TJ' => 'Tajikistan',
+    'TK' => 'Tokelau',
+    'TL' => 'Timor-Leste',
+    'TM' => 'Turkmenistan',
+    'TN' => 'Tunisia',
+    'TO' => 'Tonga',
+    'TR' => 'Turkey',
+    'TT' => 'Trinidad and Tobago',
+    'TV' => 'Tuvalu',
+    'TZ' => 'United Republic of Tanzania',
+    'UA' => 'Ukraine',
+    'UG' => 'Uganda',
+    'UY' => 'Uruguay',
+    'UZ' => 'Uzbekistan',
+    'VA' => 'Holy See',
+    'VC' => 'Saint Vincent and the Grenadines',
+    'VE' => 'Venezuela (Bolivarian Republic of)',
+    'VG' => 'British Virgin Islands',
+    'VI' => 'United States Virgin Islands',
+    'VN' => 'Viet Nam',
+    'VU' => 'Vanuatu',
+    'WF' => 'Wallis and Futuna Islands',
+    'WS' => 'Samoa',
+    'YE' => 'Yemen',
+    'YT' => 'Mayotte',
+    'ZA' => 'South Africa',
+    'ZM' => 'Zambia',
+    'ZW' => 'Zimbabwe',
+  );
+
+  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
+  $prevdomain = '';
+  $weight = 0;
+  foreach ($attributes as $domain => $attribute) {
+    if ($domain != $prevdomain) $weight=0;
+    foreach ($attribute as $key => $value) {
+      db_query($s, $domain, $key, $value, $weight);
+      $weight++;
+    }
+    $prevdomain = $domain;
+  }
 }
 
 function stormorganization_disable() {
@@ -15,6 +284,8 @@ function stormorganization_disable() {
 
 function stormorganization_uninstall() {
   drupal_uninstall_schema('stormorganization');
+
+  db_query($s = "DELETE FROM {stormattribute} WHERE domain IN ('Price mode', 'Currency', 'Country')");
 }
 
 function stormorganization_schema() {
@@ -99,3 +370,280 @@ function stormorganization_update_6201() {
   return $return;
 }
 
+function stormorganization_update_6202() {
+  // Only run this update if was not previously run as part of the legacy stormattribute module
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 2) {
+    $attributes['Currency'] = array(
+      'USD' => 'US Dollar',
+      'CAD' => 'Canadian Dollar',
+      'EUR' => 'Euro',
+      'GBP' => 'British Pound',
+      'JPY' => 'Japanese Yen',
+      'CHF' => 'Swiss Franc',
+    );
+
+    $attributes['Country'] = array(
+      'AD' => 'Andorra',
+      'AE' => 'United Arab Emirates',
+      'AF' => 'Afghanistan',
+      'AG' => 'Antigua and Barbuda',
+      'AI' => 'Anguilla',
+      'AL' => 'Albania',
+      'AM' => 'Armenia',
+      'AN' => 'Netherlands Antilles',
+      'AO' => 'Angola',
+      'AR' => 'Argentina',
+      'AS' => 'American Samoa',
+      'AT' => 'Austria',
+      'AU' => 'Australia',
+      'AW' => 'Aruba',
+      'AX' => 'Åland Islands',
+      'AZ' => 'Azerbaijan',
+      'BA' => 'Bosnia and Herzegovina',
+      'BB' => 'Barbados',
+      'BD' => 'Bangladesh',
+      'BE' => 'Belgium',
+      'BF' => 'Burkina Faso',
+      'BG' => 'Bulgaria',
+      'BH' => 'Bahrain',
+      'BI' => 'Burundi',
+      'BJ' => 'Benin',
+      'BL' => 'Saint-Barthélemy',
+      'BM' => 'Bermuda',
+      'BN' => 'Brunei Darussalam',
+      'BO' => 'Bolivia',
+      'BR' => 'Brazil',
+      'BS' => 'Bahamas',
+      'BT' => 'Bhutan',
+      'BW' => 'Botswana',
+      'BY' => 'Belarus',
+      'BZ' => 'Belize',
+      'CA' => 'Canada',
+      'CD' => 'Democratic Republic of the Congo',
+      'CF' => 'Central African Republic',
+      'CG' => 'Congo',
+      'CH' => 'Switzerland',
+      'CI' => "Côte d'Ivoire",
+      'CK' => 'Cook Islands',
+      'CL' => 'Chile',
+      'CM' => 'Cameroon',
+      'CN' => 'China',
+      'CO' => 'Colombia',
+      'CR' => 'Costa Rica',
+      'CU' => 'Cuba',
+      'CV' => 'Cape Verde',
+      'CY' => 'Cyprus',
+      'CZ' => 'Czech Republic',
+      'DE' => 'Germany',
+      'DJ' => 'Djibouti',
+      'DK' => 'Denmark',
+      'DM' => 'Dominica',
+      'DO' => 'Dominican Republic',
+      'DZ' => 'Algeria',
+      'EC' => 'Ecuador',
+      'EE' => 'Estonia',
+      'EG' => 'Egypt',
+      'EH' => 'Western Sahara',
+      'ER' => 'Eritrea',
+      'ES' => 'Spain',
+      'ET' => 'Ethiopia',
+      'FI' => 'Finland',
+      'FJ' => 'Fiji',
+      'FK' => 'Falkland Islands (Malvinas)',
+      'FM' => 'Micronesia, Federated States of',
+      'FO' => 'Faeroe Islands',
+      'FR' => 'France',
+      'GA' => 'Gabon',
+      'GB' => 'United Kingdom of Great Britain and Northern Ireland',
+      'GD' => 'Grenada',
+      'GE' => 'Georgia',
+      'GF' => 'French Guiana',
+      'GG' => 'Guernsey',
+      'GH' => 'Ghana',
+      'GI' => 'Gibraltar',
+      'GL' => 'Greenland',
+      'GM' => 'Gambia',
+      'GN' => 'Guinea',
+      'GP' => 'Guadeloupe',
+      'GQ' => 'Equatorial Guinea',
+      'GR' => 'Greece',
+      'GT' => 'Guatemala',
+      'GU' => 'Guam',
+      'GW' => 'Guinea-Bissau',
+      'GY' => 'Guyana',
+      'HK' => 'Hong Kong Special Administrative Region of China',
+      'HN' => 'Honduras',
+      'HR' => 'Croatia',
+      'HT' => 'Haiti',
+      'HU' => 'Hungary',
+      'ID' => 'Indonesia',
+      'IE' => 'Ireland',
+      'IL' => 'Israel',
+      'IM' => 'Isle of Man',
+      'IN' => 'India',
+      'IQ' => 'Iraq, Republic of',
+      'IR' => 'Iran, Islamic Republic of',
+      'IS' => 'Iceland',
+      'IT' => 'Italy',
+      'JE' => 'Jersey',
+      'JM' => 'Jamaica',
+      'JO' => 'Jordan',
+      'JP' => 'Japan',
+      'KE' => 'Kenya',
+      'KG' => 'Kyrgyzstan',
+      'KH' => 'Cambodia',
+      'KI' => 'Kiribati',
+      'KM' => 'Comoros',
+      'KN' => 'Saint Kitts and Nevis',
+      'KP' => "Democratic People's Republic of Korea",
+      'KR' => 'Republic of Korea',
+      'KW' => 'Kuwait',
+      'KY' => 'Cayman Islands',
+      'KZ' => 'Kazakhstan',
+      'LA' => "Lao People's Democratic Republic",
+      'LB' => 'Lebanon',
+      'LC' => 'Saint Lucia',
+      'LI' => 'Liechtenstein',
+      'LK' => 'Sri Lanka',
+      'LR' => 'Liberia',
+      'LS' => 'Lesotho',
+      'LT' => 'Lithuania',
+      'LU' => 'Luxembourg',
+      'LV' => 'Latvia',
+      'LY' => 'Libyan Arab Jamahiriya',
+      'MA' => 'Morocco',
+      'MC' => 'Monaco',
+      'MD' => 'Moldova',
+      'ME' => 'Montenegro',
+      'MF' => 'Saint-Martin (French part)',
+      'MG' => 'Madagascar',
+      'MH' => 'Marshall Islands',
+      'MK' => 'The former Yugoslav Republic of Macedonia',
+      'ML' => 'Mali',
+      'MM' => 'Myanmar',
+      'MN' => 'Mongolia',
+      'MO' => 'Macao Special Administrative Region of China',
+      'MP' => 'Northern Mariana Islands',
+      'MQ' => 'Martinique',
+      'MR' => 'Mauritania',
+      'MS' => 'Montserrat',
+      'MT' => 'Malta',
+      'MU' => 'Mauritius',
+      'MV' => 'Maldives',
+      'MW' => 'Malawi',
+      'MX' => 'Mexico',
+      'MY' => 'Malaysia',
+      'MZ' => 'Mozambique',
+      'NA' => 'Namibia',
+      'NC' => 'New Caledonia',
+      'NE' => 'Niger',
+      'NF' => 'Norfolk Island',
+      'NG' => 'Nigeria',
+      'NI' => 'Nicaragua',
+      'NL' => 'Netherlands',
+      'NO' => 'Norway',
+      'NP' => 'Nepal',
+      'NR' => 'Nauru',
+      'NU' => 'Niue',
+      'NZ' => 'New Zealand',
+      'OM' => 'Oman',
+      'PA' => 'Panama',
+      'PE' => 'Peru',
+      'PF' => 'French Polynesia',
+      'PG' => 'Papua New Guinea',
+      'PH' => 'Philippines',
+      'PK' => 'Pakistan',
+      'PL' => 'Poland',
+      'PM' => 'Saint Pierre and Miquelon',
+      'PN' => 'Pitcairn',
+      'PR' => 'Puerto Rico',
+      'PS' => 'Occupied Palestinian Territory',
+      'PT' => 'Portugal',
+      'PW' => 'Palau',
+      'PY' => 'Paraguay',
+      'QA' => 'Qatar',
+      'RE' => 'Réunion',
+      'RO' => 'Romania',
+      'RS' => 'Serbia',
+      'RU' => 'Russian Federation',
+      'RW' => 'Rwanda',
+      'SA' => 'Saudi Arabia',
+      'SB' => 'Solomon Islands',
+      'SC' => 'Seychelles',
+      'SD' => 'Sudan',
+      'SE' => 'Sweden',
+      'SG' => 'Singapore',
+      'SH' => 'Saint Helena',
+      'SI' => 'Slovenia',
+      'SJ' => 'Svalbard and Jan Mayen Islands',
+      'SK' => 'Slovakia',
+      'SL' => 'Sierra Leone',
+      'SM' => 'San Marino',
+      'SN' => 'Senegal',
+      'SO' => 'Somalia',
+      'SR' => 'Suriname',
+      'ST' => 'Sao Tome and Principe',
+      'SV' => 'El Salvador',
+      'SY' => 'Syrian Arab Republic',
+      'SZ' => 'Swaziland',
+      'TC' => 'Turks and Caicos Islands',
+      'TD' => 'Chad',
+      'TG' => 'Togo',
+      'TH' => 'Thailand',
+      'TJ' => 'Tajikistan',
+      'TK' => 'Tokelau',
+      'TL' => 'Timor-Leste',
+      'TM' => 'Turkmenistan',
+      'TN' => 'Tunisia',
+      'TO' => 'Tonga',
+      'TR' => 'Turkey',
+      'TT' => 'Trinidad and Tobago',
+      'TV' => 'Tuvalu',
+      'TZ' => 'United Republic of Tanzania',
+      'UA' => 'Ukraine',
+      'UG' => 'Uganda',
+      'UY' => 'Uruguay',
+      'US' => 'United States of America',
+      'UZ' => 'Uzbekistan',
+      'VA' => 'Holy See',
+      'VC' => 'Saint Vincent and the Grenadines',
+      'VE' => 'Venezuela (Bolivarian Republic of)',
+      'VG' => 'British Virgin Islands',
+      'VI' => 'United States Virgin Islands',
+      'VN' => 'Viet Nam',
+      'VU' => 'Vanuatu',
+      'WF' => 'Wallis and Futuna Islands',
+      'WS' => 'Samoa',
+      'YE' => 'Yemen',
+      'YT' => 'Mayotte',
+      'ZA' => 'South Africa',
+      'ZM' => 'Zambia',
+      'ZW' => 'Zimbabwe',
+    );
+    $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
+    $prevdomain = '';
+    $weight = 0;
+    foreach ($attributes as $domain => $attribute) {
+      if ($domain != $prevdomain) $weight=0;
+      foreach ($attribute as $key => $value) {
+        db_query($s, $domain, $key, $value, $weight);
+        $weight++;
+      }
+      $prevdomain = $domain;
+    }
+  }
+
+  $ret = array();
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6110) {
+    $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Price mode', 'not applicable', 'Not Applicable', 0, 1)");
+  }
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6112) {
+    $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Price mode', 'fixed_price', 'Fixed Price', 0, 1)");
+    $ret[] = update_sql("UPDATE {stormorganization} set pricemode='fixed_price' where pricemode='fixed_timetracking'");
+    $ret[] = update_sql("DELETE FROM {stormattribute} where domain = 'Price mode' and akey = 'fixed_timetracking'");
+  }
+
+  return $ret;
+}
diff --git a/stormproject/stormproject.install b/stormproject/stormproject.install
index 0ca85c9..964e494 100644
--- a/stormproject/stormproject.install
+++ b/stormproject/stormproject.install
@@ -7,6 +7,67 @@
 function stormproject_install() {
   drupal_install_schema('stormproject');
   variable_set('node_options_stormproject', array('status'));
+
+  $attributes = array();
+
+  $attributes['Project status'] = array(
+    'inserted' => 'inserted',
+    'in progress' => 'in progress',
+    'on hold' => 'on hold',
+    'completed' => 'completed'
+  );
+
+  $attributes['Project status search'] = array(
+    '-' => 'all',
+    'inserted,in progress,on hold' => 'open',
+    'inserted' => '-- inserted',
+    'in progress' => '-- in progress',
+    'on hold' => '-- on hold',
+    'completed' => 'completed'
+  );
+
+  $attributes['Project category'] = array(
+    'development' => 'development',
+    'support' => 'support',
+  );
+
+  $attributes['Project category search'] = array(
+    '-' => 'all',
+    'development' => 'development',
+    'support' => 'support',
+  );
+
+  $attributes['Project priority'] = array(
+    '1-low' => 'low',
+    '2-normal' => 'normal',
+    '3-high' => 'high',
+    '4-urgent' => 'urgent'
+  );
+
+  $attributes['Project priority search'] = array(
+    '-' => 'all',
+    '1-low' => 'low',
+    '2-normal' => 'normal',
+    '3-high' => 'high',
+    '4-urgent' => 'urgent'
+  );
+
+  $attributes['Duration unit'] = array(
+    'hour' => 'Hour',
+    'day' => 'Day',
+  );
+
+  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
+  $prevdomain = '';
+  $weight = 0;
+  foreach ($attributes as $domain => $attribute) {
+    if ($domain != $prevdomain) $weight=0;
+    foreach ($attribute as $key => $value) {
+      db_query($s, $domain, $key, $value, $weight);
+      $weight++;
+    }
+    $prevdomain = $domain;
+  }
 }
 
 function stormproject_disable() {
@@ -128,4 +189,65 @@ function stormproject_update_6201() {
     db_add_index($return, 'stormproject', $name, $fields);
   }
   return $return;
-}
\ No newline at end of file
+}
+
+function stormproject_update_6202() {
+  $attributes = array();
+
+  // Only run this update if was not previously run as part of the legacy stormattribute module
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 1) {
+    $attributes['Project priority'] = array(
+      '1-low' => 'low',
+      '2-normal' => 'normal',
+      '3-high' => 'high',
+      '4-urgent' => 'urgent'
+    );
+
+    $attributes['Project priority search'] = array(
+      '1-low' => 'low',
+      '2-normal' => 'normal',
+      '3-high' => 'high',
+      '4-urgent' => 'urgent'
+    );
+  }
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 4) {
+    $attributes['Duration unit'] = array(
+      'hour' => 'Hour',
+      'day' => 'Day',
+    );
+  }
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6) {
+    $attributes['Project status search'] = array('-' => 'all');
+    $attributes['Project priority search'] = array('-' => 'all');
+  }
+
+  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
+  $prevdomain = '';
+  $weight = 0;
+  foreach ($attributes as $domain => $attribute) {
+    if ($domain != $prevdomain) $weight=0;
+    foreach ($attribute as $key => $value) {
+      db_query($s, $domain, $key, $value, $weight);
+      $weight++;
+    }
+    $prevdomain = $domain;
+  }
+
+  $ret = array();
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6107) {
+    $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Project category search', 'development', 'development', 0, 1)");
+    $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Project category search', 'support', 'support', 0, 1)");
+  }
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6109) {
+    $ret[] = update_sql("INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('Project category search', '-', 'all', 0, 1)");
+  }
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6112) {
+    $ret[] = update_sql("UPDATE {stormproject} set pricemode='fixed_price' where pricemode='fixed_timetracking'");
+  }
+  return $ret;
+}
diff --git a/stormtask/stormtask.install b/stormtask/stormtask.install
index 24d5c5a..8bee87d 100644
--- a/stormtask/stormtask.install
+++ b/stormtask/stormtask.install
@@ -7,6 +7,68 @@
 function stormtask_install() {
   drupal_install_schema('stormtask');
   variable_set('node_options_stormtask', array('status'));
+
+  $attributes = array();
+
+  $attributes['Task status'] = array(
+    'inserted' => 'inserted',
+    'in progress' => 'in progress',
+    'on hold' => 'on hold',
+    'completed' => 'completed'
+  );
+
+  $attributes['Task status search'] = array(
+    '-' => 'all',
+    'inserted,in progress,on hold' => 'open',
+    'inserted' => '-- inserted',
+    'in progress' => '-- in progress',
+    'on hold' => '-- on hold',
+    'completed' => 'completed'
+  );
+
+  $attributes['Task category'] = array(
+    'bug' => 'bug',
+    'feature request' => 'feature request',
+    'support' => 'support',
+    'task' => 'task'
+  );
+
+  $attributes['Task priority'] = array(
+    '1-low' => 'low',
+    '2-normal' => 'normal',
+    '3-high' => 'high',
+    '4-urgent' => 'urgent'
+  );
+
+  $attributes['Task priority search'] = array(
+    '-' => 'all',
+    '1-low' => 'low',
+    '2-normal' => 'normal',
+    '3-high' => 'high',
+    '4-urgent' => 'urgent'
+  );
+
+  $attributes['Task category search'] = array(
+    '-' => 'all',
+    'bug' => 'bug',
+    'feature request' => 'feature request',
+    'support' => 'support',
+    'task' => 'task'
+  );
+
+  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
+  $prevdomain = '';
+  $weight = 0;
+  foreach ($attributes as $domain => $attribute) {
+    if ($domain != $prevdomain) $weight=0;
+    foreach ($attribute as $key => $value) {
+      db_query($s, $domain, $key, $value, $weight);
+      $weight++;
+    }
+    $prevdomain = $domain;
+  }
+
+  db_query("UPDATE {stormattribute} SET isdefault = 1 WHERE domain = 'Task category' and akey = 'task'");
 }
 
 function stormtask_disable() {
@@ -127,4 +189,63 @@ function stormtask_update_6201() {
     db_add_index($return, 'stormtask', $name, $fields);
   }
   return $return;
-}
\ No newline at end of file
+}
+
+function stormtask_update_6202() {
+  $attributes = array();
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 1) {
+    $attributes['Task category'] = array(
+      'bug' => 'bug',
+      'feature request' => 'feature request',
+      'support' => 'support',
+      'task' => 'task'
+    );
+
+    $attributes['Task priority'] = array(
+      '1-low' => 'low',
+      '2-normal' => 'normal',
+      '3-high' => 'high',
+      '4-urgent' => 'urgent'
+    );
+
+    $attributes['Task priority search'] = array(
+      '1-low' => 'low',
+      '2-normal' => 'normal',
+      '3-high' => 'high',
+      '4-urgent' => 'urgent'
+    );
+  }
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6) {
+    $attributes['Task category search'] = array(
+      '-' => 'all',
+      'bug' => 'bug',
+      'feature request' => 'feature request',
+      'support' => 'support',
+      'task' => 'task'
+    );
+
+    $attributes['Task status search'] = array('-' => 'all');
+    $attributes['Task priority search'] = array('-' => 'all');
+  }
+
+  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
+  $prevdomain = '';
+  $weight = 0;
+  foreach ($attributes as $domain => $attribute) {
+    if ($domain != $prevdomain) $weight=0;
+    foreach ($attribute as $key => $value) {
+      db_query($s, $domain, $key, $value, $weight);
+      $weight++;
+    }
+    $prevdomain = $domain;
+  }
+  $ret = array();
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6112) {
+    $ret[] = update_sql("UPDATE {stormtask} set pricemode='fixed_price' where pricemode='fixed_timetracking'");
+  }
+
+  return $ret;
+}
diff --git a/stormticket/stormticket.install b/stormticket/stormticket.install
index 1edf371..141a224 100644
--- a/stormticket/stormticket.install
+++ b/stormticket/stormticket.install
@@ -7,6 +7,68 @@
 function stormticket_install() {
   drupal_install_schema('stormticket');
   variable_set('node_options_stormticket', array('status'));
+
+  $attributes = array();
+
+  $attributes['Ticket status'] = array(
+    'inserted' => 'inserted',
+    'in progress' => 'in progress',
+    'on hold' => 'on hold',
+    'completed' => 'completed'
+  );
+
+  $attributes['Ticket status search'] = array(
+    '-' => 'all',
+    'inserted,in progress,on hold' => 'open',
+    'inserted' => '-- inserted',
+    'in progress' => '-- in progress',
+    'on hold' => '-- on hold',
+    'completed' => 'completed'
+  );
+
+  $attributes['Ticket category'] = array(
+    'estimate' => 'estimate',
+    'bug' => 'bug',
+    'feature request' => 'feature request',
+    'support' => 'support',
+    'task' => 'task'
+ );
+
+  $attributes['Ticket category search'] = array(
+    '-' => 'all',
+    'estimate' => 'estimate',
+    'bug' => 'bug',
+    'feature request' => 'feature request',
+    'support' => 'support',
+    'task' => 'task'
+  );
+
+  $attributes['Ticket priority'] = array(
+    '1-low' => 'low',
+    '2-normal' => 'normal',
+    '3-high' => 'high',
+    '4-urgent' => 'urgent'
+  );
+
+  $attributes['Ticket priority search'] = array(
+    '-' => 'all',
+    '1-low' => 'low',
+    '2-normal' => 'normal',
+    '3-high' => 'high',
+    '4-urgent' => 'urgent'
+  );
+
+  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight) VALUES ('%s', '%s', '%s', %d)";
+  $prevdomain = '';
+  $weight = 0;
+  foreach ($attributes as $domain => $attribute) {
+    if ($domain != $prevdomain) $weight=0;
+    foreach ($attribute as $key => $value) {
+      db_query($s, $domain, $key, $value, $weight);
+      $weight++;
+    }
+    $prevdomain = $domain;
+  }
 }
 
 function stormticket_disable() {
@@ -128,4 +190,43 @@ function stormticket_update_6201() {
     db_add_index($return, 'stormticket', $name, $fields);
   }
   return $return;
-}
\ No newline at end of file
+}
+
+function stormticket_update_6202() {
+  $attributes = array();
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 5) {
+    $attributes['Ticket category search'] = array(
+      'bug' => 'bug',
+      'feature request' => 'feature request',
+      'support' => 'support',
+      'task' => 'task'
+    );
+  }
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6) {
+    $attributes['Ticket status search'] = array('-' => 'all');
+    $attributes['Ticket category search'] = array('-' => 'all');
+    $attributes['Ticket priority search'] = array('-' => 'all');
+  }
+
+  $s = "INSERT INTO {stormattribute} (domain, akey, avalue, weight, isactive) VALUES ('%s', '%s', '%s', %d, 1)";
+  $prevdomain = '';
+  $weight = 0;
+  foreach ($attributes as $domain => $attribute) {
+    if ($domain != $prevdomain) $weight=0;
+    foreach ($attribute as $key => $value) {
+     db_query($s, $domain, $key, $value, $weight);
+      $weight++;
+    }
+    $prevdomain = $domain;
+  }
+
+  $ret = array();
+
+  if(db_result(db_query("SELECT schema_version FROM {system} WHERE name = 'stormattribute'")) < 6112) {
+    $ret[] = update_sql("UPDATE {stormticket} set pricemode='fixed_price' where pricemode='fixed_timetracking'");
+  }
+
+  return $ret;
+}
