diff --git a/modules/signup_webform/signup_webform.module b/modules/signup_webform/signup_webform.module
index 88951ed..c2f7e4c 100644
--- a/modules/signup_webform/signup_webform.module
+++ b/modules/signup_webform/signup_webform.module
@@ -74,11 +74,11 @@ function signup_webform_signup_pane_info($node = NULL) {
       'operations' => array(
         array(
           'href'  => 'node/' . $webform->nid . '/edit',
-          'title' => 'Edit webform',
+          'title' => 'Edit webform node',
           'destination' => TRUE,
         ),
         array(
-          'href'  => 'node/' . $webform->nid . '/edit/components',
+          'href'  => 'node/' . $webform->nid . '/webform',
           'title' => 'Edit components',
           'destination' => TRUE,
         ),
@@ -120,8 +120,8 @@ function signup_webform_form(&$signup_form, &$form_state, $node, $signup, $pane_
   $webform_nid = substr($pane_id, 8);
   $webform_node = node_load($webform_nid);
   
-  module_load_include('inc', 'webform', 'webform_components');
-  webform_load_components();
+  module_load_include('inc', 'webform', 'includes/webform.components');
+  webform_components();
   
   // Load the webform submission for existing signups, so the webform API
   // takes care of putting in existing data.
@@ -134,7 +134,7 @@ function signup_webform_form(&$signup_form, &$form_state, $node, $signup, $pane_
   $page_num = 1;
   _webform_components_tree_build($webform_node->webform['components'], $component_tree, 0, $page_count);
   
-  //dsm($component_tree);
+  //print_r($component_tree);
 
   // Recursively add components to the form. Microweights keep things in webform order.
   // No idea what most of these do; _webform_client_form_add_component() is an undocumented black box!
@@ -143,7 +143,9 @@ function signup_webform_form(&$signup_form, &$form_state, $node, $signup, $pane_
   foreach ($component_tree['children'] as $cid => $component) {
     // we have no existing values here ever.
     $component_value = NULL;
-    _webform_client_form_add_component($cid, $component, $component_value, $form, $form, $submission, $page_num, $enabled);
+    //webform 2.x: _webform_client_form_add_component($cid, $component, $component_value, $form, $form, $submission, $page_num, $enabled);
+    // webform 3.x
+    _webform_client_form_add_component($webform_node, $component, $component_value, $form, $signup_form, $form_state, $submission, 'form', $page_num, $enabled);
   }
     
   return $form;
@@ -154,10 +156,11 @@ function signup_webform_form(&$signup_form, &$form_state, $node, $signup, $pane_
  */
 function signup_webform_signup_data_alter(&$signup, $form_values) {
   // Act on each pane that is a webform pane.
+  
   foreach (_signup_webform_pane_ids($signup->form_data) as $pane_id) {
     // Load the webform API. 
     // Do this inside the loop so signups that don't use webform don't load this.
-    module_load_include('inc', 'webform', 'webform_submissions');
+    module_load_include('inc', 'webform', 'includes/webform.submissions');
     
     // Get the real nid from the prefixed pane ID and thence the node.
     $webform_nid = substr($pane_id, 8);
@@ -209,8 +212,21 @@ function signup_webform_signup_data_alter(&$signup, $form_values) {
     }
     else {
       // new signup: insert webform submission.
-      $sid = webform_submission_insert($webform_node, $submitted);
       
+      $submission = (object) array(
+        'nid' => $webform_nid,
+        'uid' => $user->uid,
+        'submitted' => time(),
+        'remote_addr' => ip_address(),
+        'is_draft' => $is_draft,
+        'data' => webform_submission_data($webform_node, $submitted),
+      );
+      
+      $sid = webform_submission_insert($webform_node, $submission);
+      //print_r($webform_node);
+      //print_r($submission); 
+      //print $sid; 
+      //die;
       // Replace our data with just the submission ID; this is retrieved
       // by signup_webform_signup_insert() once the signup is saved and has 
       // an ID.
@@ -275,9 +291,9 @@ function signup_webform_signup_form_data_display_alter(&$form_data, $nid, $sid,
   foreach (_signup_webform_pane_ids($form_data) as $pane_id) {
     // Load the webform API.
     if (!isset($webform_loaded)) {
-      module_load_include('inc', 'webform', 'webform_submissions');
-      module_load_include('inc', 'webform', 'webform_components');
-      webform_load_components();
+      module_load_include('inc', 'webform', 'includes/webform.submissions');
+      module_load_include('inc', 'webform', 'includes/webform.components');
+      webform_components();
       $webform_loaded = TRUE;
     }
     
@@ -293,6 +309,8 @@ function signup_webform_signup_form_data_display_alter(&$form_data, $nid, $sid,
     $submission_sid = $form_data[$pane_id]['sid'];
     $submission = webform_get_submission($webform_nid, $submission_sid);
     
+    //print_r($submission);// die;
+    
     // Check there is an actual submission: if no webform fields are compulsory,
     // a user can sign up and not create a corresponding webform submission.
     if (isset($submission)) {
@@ -302,7 +320,7 @@ function signup_webform_signup_form_data_display_alter(&$form_data, $nid, $sid,
         $components[$webform_nid] = $webform_node->webform['components'];
       }
 
-      foreach ($submission->data as $cid => $component_data) {
+      foreach ($submission->data as $cid => $component_data) { 
         $component = $components[$webform_nid][$cid];
         $label     = $components[$webform_nid][$cid]['name'];
         // Hijack webform's email output theming: this, as far as I can tell,
@@ -314,12 +332,17 @@ function signup_webform_signup_form_data_display_alter(&$form_data, $nid, $sid,
         if  (count($component_data['value']) == 1) {
           $component_data['value'] = array_shift($component_data['value']); 
         }
-        $themed_output = theme('webform_mail_' . $component['type'], $component_data['value'], $component);
+        print_r($component);
+        $themed_output = theme('theme_webform_display_' . $component['type'], $component);
+        //$themed_output = theme('webform_element_text', $component, $component_data['value']);
+        //webform 2 theme('webform_mail_' . $component['type'], $component_data['value'], $component);
         // Use a numeric key rather than $label so the key is not output by 
         // theme functions -- webform's output already includes the label.
         $form_data[$pane_id][] = $themed_output;
+        //print_r($form_data);
       }
     }
+    //print_r($form_data); die;
     // Remove the sid from display: it is internal data.
     unset($form_data[$pane_id]['sid']);
   }
@@ -335,7 +358,7 @@ function signup_webform_signup_cancel($signup, $node) {
   
   foreach (_signup_webform_pane_ids($form_data) as $pane_id) {
     // Load the webform API.
-    module_load_include('inc', 'webform', 'webform_submissions');
+    module_load_include('inc', 'webform', 'includes/webform.submissions');
     
     // Get the real nid from the prefixed pane ID and thence the node.
     $webform_nid = substr($pane_id, 8);
@@ -365,7 +388,7 @@ function signup_webform_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
     // Act on records pertaining to each webform that this signup is linked to.
     foreach (_signup_webform_pane_ids($node->signup_form_panes) as $pane_id) {
       // Load the webform API.
-      module_load_include('inc', 'webform', 'webform_submissions');
+      module_load_include('inc', 'webform', 'includes/webform.submissions');
       
       $webform_nid = substr($pane_id, 8);
       $webform_node = node_load($webform_nid);
@@ -439,7 +462,7 @@ function signup_webform_get_signup_submission($signup, $webform_nid) {
   // Beware: both pieces of data we care about here are called sid!
   $submission_sid = db_result(db_query('SELECT submission_sid FROM {signup_webform_submission} WHERE signup_sid = %d AND webform_nid = %d', $signup->sid, $webform_nid));
   // Load the webform API.
-  module_load_include('inc', 'webform', 'webform_submissions');
+  module_load_include('inc', 'webform', 'includes/webform.submissions');
   $submission = webform_get_submission($webform_nid, $submission_sid);
   return $submission;
 }
