diff --git a/dvg_appointments.module b/dvg_appointments.module
index 7047f52..7e5299b 100644
--- a/dvg_appointments.module
+++ b/dvg_appointments.module
@@ -78,20 +78,6 @@ function dvg_appointments_functional_content() {
 }
 
 /**
- * Helper function that checks if the current form is an appointment-webform.
- */
-function _dvg_appointments_is_appointment($nid, $type) {
-  $type = 'dvg_appointments_' . $type;
-  $fc_types = dvg_appointments_functional_content();
-  unset($fc_types['#group']);
-  if (isset($fc_types[$type])) {
-    return $nid == functional_content_nid($type);
-  }
-
-  return FALSE;
-}
-
-/**
  * Implements hook_dvg_requirements().
  */
 function dvg_appointments_dvg_requirements() {
@@ -1410,13 +1396,11 @@ function _dvg_appointments_table(DvgAppointment $appointment, $table = TRUE) {
  */
 function dvg_appointments_form_webform_client_form_alter(&$form, &$form_state) {
   $node = $form['#node'];
-  $nid = $node->nid;
-  $is_app_create = _dvg_appointments_is_appointment($nid, 'create');
-  $is_app_cancel = _dvg_appointments_is_appointment($nid, 'cancel');
-  $preview_enabled = $form['#node']->webform['preview'];
+
+  $preview_enabled = $node->webform['preview'];
   $last_page = $form_state['webform']['page_num'] == $form_state['webform']['page_count'];
 
-  if ($is_app_create) {
+  if (isset($node->webform['appointment_enabled']) && $node->webform['appointment_enabled']) {
     $form['#attributes']['class'][] = 'appointment-webform';
 
     $wa_products = dvg_appointments_get_selected_products($form_state, $form);
@@ -1425,7 +1409,7 @@ function dvg_appointments_form_webform_client_form_alter(&$form, &$form_state) {
       $form['#validate'][] = 'dvg_appointments_book_appointment';
     }
 
-    $wa_product = dvg_appointments_get_cid($form['#node'], 'wa_product');
+    $wa_product = dvg_appointments_get_cid($node, 'wa_product');
     if ($wa_product && $form_state['webform']['page_num'] == $node->webform['components'][$wa_product]['page_num']) {
       $form['#validate'][] = 'dvg_appointments_validate_available_date_time';
     }
@@ -1474,10 +1458,10 @@ function dvg_appointments_form_webform_client_form_alter(&$form, &$form_state) {
     }
   }
 
-  if ($is_app_cancel) {
+  elseif ($node->nid == functional_content_nid('dvg_appointments_cancel')) {
     $form['#attributes']['class'][] = 'appointment-webform';
 
-    $wa_appointment = dvg_appointments_get_cid($form['#node'], 'wa_appointment');
+    $wa_appointment = dvg_appointments_get_cid($node, 'wa_appointment');
     if ($wa_appointment && $last_page) {
       $form['#validate'][] = 'dvg_appointments_cancel_appointment';
       $form['#submit'][] = 'dvg_appointments_webform_cancel_submit';
@@ -1721,20 +1705,18 @@ function _dvg_appointments_create_info($appointment, $html = TRUE) {
  * Add the appointment info to the confirmation message.
  */
 function dvg_appointments_preprocess_webform_confirmation(&$vars) {
-  $nid = $vars['node']->nid;
-  $is_app_create = _dvg_appointments_is_appointment($nid, 'create');
-  $is_app_cancel = _dvg_appointments_is_appointment($nid, 'cancel');
+  $node = $vars['node'];
 
   // Appointment created.
-  if ($is_app_create) {
-    $vars['confirmation_message'] .= _dvg_appointments_create_info(dvg_appointments_get_appointments($vars['node']->nid, $vars['sid']));
+  if (isset($node->webform['appointment_enabled']) && $node->webform['appointment_enabled']) {
+    $vars['confirmation_message'] .= _dvg_appointments_create_info(dvg_appointments_get_appointments($node->nid, $vars['sid']));
   }
 
   // Appointment canceled.
-  elseif ($is_app_cancel) {
-    $wa_appointment_cid = dvg_appointments_get_cid($vars['node'], 'wa_appointment');
+  elseif ($node->nid == functional_content_nid('dvg_appointments_cancel')) {
+    $wa_appointment_cid = dvg_appointments_get_cid($node, 'wa_appointment');
     if ($wa_appointment_cid) {
-      $submission = webform_get_submission($vars['node']->nid, $vars['sid']);
+      $submission = webform_get_submission($node->nid, $vars['sid']);
       $appointment = $submission->data[$wa_appointment_cid]['appointment'];
 
       $markup = array(
