diff --git a/README.txt b/README.txt
index 2ceb688..7c81318 100644
--- a/README.txt
+++ b/README.txt
@@ -15,7 +15,7 @@ There are three steps to setting up a form with Fill PDF: (1) creating the webfo
    1. To create the webform/content-type wherein users will enter data. Options:
           * Use CCK
           * Use webform (see #374121: Webform Support)
-          
+
    2. To map the webform to a PDF, do the following:
          1. Go to /admin/content/fillpdf
          2. Upload a PDF template, a form mapping will be generated [2]
@@ -23,23 +23,23 @@ There are three steps to setting up a form with Fill PDF: (1) creating the webfo
                 * "Label" is for your own use in identifying fields
                 * "PDF Key" is the field-name from the original PDF Form (such as text_field_1) and is the piece that maps the form-field to the PDF field
                 * "Value" is where you either enter static data to populate the field, or token-data to pull information form the users' forms. For example, if I created a CCK form with a text-field called field_first_name, then I would enter [field-field_first_name-raw] here. There is a list of tokens you can use at the bottom of that page.
-                
-   3. Once your user fills a form, they'll need a link to download their PDF.  You can place this link in a block, .tpl.php, or anywhere.  
-      The link will need (1) The form-id (you can see an example URL on your form's edit-page), (2) the node-id, and/or (3) the webform's node-id and optionally its submission-id (defaults to latest-submission if none provided)  
+
+   3. Once your user fills a form, they'll need a link to download their PDF.  You can place this link in a block, .tpl.php, or anywhere.
+      The link will need (1) The form-id (you can see an example URL on your form's edit-page), (2) the node-id, and/or (3) the webform's node-id and optionally its submission-id (defaults to latest-submission if none provided)
       Here are some ways to generate the link:
           * Add the link in PHP (recommended).  Examples:
                 * One-node link: <?php echo l("PDF", fillpdf_pdf_link($form_id = 1, $node_id = 2)); ?>
                 * One-webform link (common): <?php echo l("PDF", fillpdf_pdf_link($form_id = 1, null, $webform = array('nid'=>3,'sid'=>4))); ?>
                 * Multiple nodes & webforms, later nids override conflicting fields (note: webforms without 'sid' default to latest submission)
                    <?php echo l("PDF", fillpdf_pdf_link($form_id = 1, $nids = array(1,2), $webforms = array( array('nid'=>3,'sid'=>1), array('nid'=>3))); ?>
-          * Add the link manually in HTML. Examples: 
+          * Add the link manually in HTML. Examples:
                 * One-node link: <a href="/fillpdf&fid=1&nid=2">PDF</a> [3]
-                * One-webform link: <a href="/fillpdf&fid=1&webform[nid]=3&webform[sid]=4">PDF</a> 
+                * One-webform link: <a href="/fillpdf&fid=1&webform[nid]=3&webform[sid]=4">PDF</a>
                 * Multiple nodes & webforms, later nids override conflicting fields (note: webforms without 'sid' default to latest submission)
                    <a href="/fillpdf&fid=1&nids[]=1&nids[]=2&webforms[0][nid]=3&webforms[0][sid]=1&webforms[1][nid]=3">PDF</a>
 
 Notes:
-  [1] http://fillpdf-service.com 
+  [1] http://fillpdf-service.com
   [2] Make sure the PDF document isn't encrypted. If it is encrypted and non copy-righted (typical of government PDFs), then try a decrypting tool like "Advanced PDF Password Recovery". If you upload an encrypted PDF, you will have empty PDFs when you attempt to download your submissions.
   [3] If clean URLs is not enabled, the URL will be in the format: /?q=fillpdf&fid=10&nid=10
 
diff --git a/fillpdf.admin.inc b/fillpdf.admin.inc
index c39ede7..1affaba 100644
--- a/fillpdf.admin.inc
+++ b/fillpdf.admin.inc
@@ -1,5 +1,5 @@
 <?php
- 
+
 /**
  * @file
  * Allows mappings of PDFs to site content
@@ -18,32 +18,32 @@ define('FILLPDF_REPLACEMENTS_DESCRIPTION', t("<p>Tokens, such as those from CCK,
 /* ---------------- Configuration --------------------*/
 
 /**
- * Settings form for user to place API Key 
+ * Settings form for user to place API Key
  */
 function fillpdf_settings(){
-	$form['settings_help'] = array(
-	  '#type'=>'markup',
-	  '#value' => t("
-	    This module requires one of several external PDF manipulation tools -- you can:<ul>
+  $form['settings_help'] = array(
+    '#type'=>'markup',
+    '#value' => t("
+      This module requires one of several external PDF manipulation tools -- you can:<ul>
         <li>Sign up for <a href='http://fillpdf-service.com'>Fillpdf as-a-service</a>, and plug your API key in here; <strong>or</strong>
         <li>Deploy locally -- You'll need a VPS or dedicated server so you can deploy PHP/JavaBridge on Tomcat (see README.txt), then select \"Use Local Service\"
         <li>Use a local installation of the pdftk program - you'll need a VPS or a dedicated server so you can install pdftk (see README.txt), then select \"Use locally-installed pdftk\"
       </ul>
-	   "),
-	);
-	$form['remote'] = array(
-	  '#type' => 'fieldset',
-	  '#title' => t('Use Remote Service'),
-	);
-	$form['remote']['fillpdf_remote_service'] = array(
-	  '#type' => 'checkbox',
-	  '#title' => t('Use fillpdf-service.com'),
-	  '#default_value' => variable_get('fillpdf_remote_service', true),
-	);
-	$form['remote']['fillpdf_api_key'] = array(
-    '#type' => 'textfield', 
+     "),
+  );
+  $form['remote'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Use Remote Service'),
+  );
+  $form['remote']['fillpdf_remote_service'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Use fillpdf-service.com'),
+    '#default_value' => variable_get('fillpdf_remote_service', true),
+  );
+  $form['remote']['fillpdf_api_key'] = array(
+    '#type' => 'textfield',
     '#title' => t('API Key'),
-    '#default_value' => variable_get('fillpdf_api_key', ''), 
+    '#default_value' => variable_get('fillpdf_api_key', ''),
     '#description' => t('')
   );
   $form['remote']['fillpdf_remote_protocol'] = array(
@@ -53,54 +53,54 @@ function fillpdf_settings(){
       sensitive information in your PDFs from being intercepted in transit.'),
     '#default_value' => variable_get('fillpdf_remote_protocol', 'http'),
     '#options' => array(
-      'http' => t('No'), 
+      'http' => t('No'),
       'https' => t('Yes'),
       ),
     );
 
-	if(variable_get('fillpdf_api_key', '')==''){
-		$form['remote']['warning'] = array(
-	    '#type' => 'markup', 
-		  '#prefix' => "<div class='warning'>", '#suffix' => "</div>",
-	    '#value' => t("You need to sign up for an API key at <a href='http://fillpdf-service.com'>fillpdf-service.com</a>"), 
-	  );
-	}
-  
-	$form['local'] = array(
+  if(variable_get('fillpdf_api_key', '')==''){
+    $form['remote']['warning'] = array(
+      '#type' => 'markup',
+      '#prefix' => "<div class='warning'>", '#suffix' => "</div>",
+      '#value' => t("You need to sign up for an API key at <a href='http://fillpdf-service.com'>fillpdf-service.com</a>"),
+    );
+  }
+
+  $form['local'] = array(
     '#type' => 'fieldset',
     '#title' => t('Use Local Service'),
   );
-	$form['local']['fillpdf_local_service'] = array(
-	  '#type' => 'checkbox',
+  $form['local']['fillpdf_local_service'] = array(
+    '#type' => 'checkbox',
     '#title' => t('Use locally-installed PHP/JavaBridge'),
     '#default_value' => (variable_get('fillpdf_local_service', true)),
-	);
+  );
   if(!(file_exists(drupal_get_path('module', 'fillpdf').'/lib/JavaBridge/java/Java.inc'))){
     $form['local']['warning'] = array(
-      '#type' => 'markup', 
+      '#type' => 'markup',
       '#prefix' => "<div class='warning'>", '#suffix' => "</div>",
-      '#value' => t("JavaBridge isn't installed locally.  See README.txt for setting it up."), 
+      '#value' => t("JavaBridge isn't installed locally.  See README.txt for setting it up."),
     );
   }
 
-	$form['local_php'] = array(
+  $form['local_php'] = array(
     '#type' => 'fieldset',
     '#title' => t('Use Local pdftk'),
   );
-	$form['local_php']['fillpdf_local_php'] = array(
-	  '#type' => 'checkbox',
+  $form['local_php']['fillpdf_local_php'] = array(
+    '#type' => 'checkbox',
     '#title' => t('Use locally-installed pdftk'),
     '#default_value' => (variable_get('fillpdf_local_php', true)),
-	);
+  );
   /*if(!(file_exists(drupal_get_path('module', 'fillpdf').'/lib/JavaBridge/java/Java.inc'))){
     $form['local']['warning'] = array(
-      '#type' => 'markup', 
+      '#type' => 'markup',
       '#prefix' => "<div class='warning'>", '#suffix' => "</div>",
-      '#value' => t("JavaBridge isn't installed locally.  See README.txt for setting it up."), 
+      '#value' => t("JavaBridge isn't installed locally.  See README.txt for setting it up."),
     );
   } */ //TODO: Modify to add check for pdftk installed
-	
-	$js = <<<JS
+
+  $js = <<<JS
 Drupal.behaviors.fillpdfSettingsCheckboxes = function (context) {
   $("input#edit-fillpdf-remote-service").click(function(){
     $("input#edit-fillpdf-local-service").attr('checked', false);
@@ -116,8 +116,8 @@ Drupal.behaviors.fillpdfSettingsCheckboxes = function (context) {
   });
 };
 JS;
-	drupal_add_js($js, 'inline');
-  
+  drupal_add_js($js, 'inline');
+
   return system_settings_form($form);
 }
 
@@ -127,64 +127,64 @@ JS;
 /**
  * Manage your existing forms, or upload a new one
  */
-function fillpdf_forms() {  
+function fillpdf_forms() {
   $result = db_query("SELECT title, fid FROM {fillpdf_forms} ORDER BY title");
   $header = array(t('Title'), array('data' => t('Operations'), 'colspan' => '4'));
   while ($pdf_form = db_fetch_object($result)) {
     $row = array(
-   		check_plain($pdf_form->title),
-    	l(t('Edit'), "admin/content/fillpdf/$pdf_form->fid"),
-    	l(t('Delete'), "admin/content/fillpdf/$pdf_form->fid/delete"),
-    	l(t('Export field mappings'), "admin/content/fillpdf/$pdf_form->fid/export"),
-    	l(t('Import field mappings'), "admin/content/fillpdf/$pdf_form->fid/import"),
-    	);
+      check_plain($pdf_form->title),
+      l(t('Edit'), "admin/content/fillpdf/$pdf_form->fid"),
+      l(t('Delete'), "admin/content/fillpdf/$pdf_form->fid/delete"),
+      l(t('Export field mappings'), "admin/content/fillpdf/$pdf_form->fid/export"),
+      l(t('Import field mappings'), "admin/content/fillpdf/$pdf_form->fid/import"),
+      );
     $rows[] = $row;
   }
-  
+
   $form['existing_forms'] = array(
       '#type' => 'markup',
       '#value' => theme('table', $header, $rows, array('id' => 'fillpdf')),
   );
-  
+
   $form['#attributes'] = array('enctype' => "multipart/form-data");
   $form['upload_pdf']=array(
-  	  '#type' => 'file',
+      '#type' => 'file',
       '#title' => 'Upload',
-	  '#description' => 'Upload a PDF template to create a new form',
+    '#description' => 'Upload a PDF template to create a new form',
   );
   $form['submit'] = array('#type' => 'submit',
       '#value' => t('Submit'),
       '#weight' => 15,
    );
-  
+
   return $form;
 }
 
 /**
- * Makes sure the Upload was provided (want to validate .pdf here too) 
+ * Makes sure the Upload was provided (want to validate .pdf here too)
  */
 function fillpdf_forms_validate($form, &$form_state) {
-  
+
   // uploading anything?
   $file = $_FILES['files']['name']['upload_pdf'];
   if(!$file)
-  	form_set_error('url', t('A PDF must be provided.'));
+    form_set_error('url', t('A PDF must be provided.'));
 
-  //from includes/file.inc, line 634, but can't use that function because file not an object yet	
+  //from includes/file.inc, line 634, but can't use that function because file not an object yet
   if (!preg_match('/\.pdf$/i', $file)) {
     form_set_error('url', t('Only PDF files are allowed'));
   }
-  
+
   // directory exist or writeable?
   $dir = file_directory_path()."/fillpdf";
   file_check_directory($dir, FILE_CREATE_DIRECTORY, 'url');
-  
+
 }
 
 /**
- * Creates a new Form from the uploaded PDF, including parsed fields 
+ * Creates a new Form from the uploaded PDF, including parsed fields
  */
-function fillpdf_forms_submit($form, &$form_state) {	  
+function fillpdf_forms_submit($form, &$form_state) {
   $dir = file_directory_path()."/fillpdf";
   // $validators not working, so I just checked manually in fillpdf_forms_validate()
   $validators = array('file_validate_extensions' => array('pdf') );
@@ -205,28 +205,28 @@ function fillpdf_forms_submit($form, &$form_state) {
 /* ---------------- Form Edit --------------------*/
 
 /**
- * Edit existing PDF form 
+ * Edit existing PDF form
  */
 function fillpdf_form_edit(&$form_state, $fid) {
   $pdf_form = db_fetch_object(db_query("SELECT * FROM {fillpdf_forms} WHERE fid = %d", $fid));
- 
+
   $form['title'] = array(
-  	  '#type' => 'textfield', 
-      '#title' => t('Title'), 
+      '#type' => 'textfield',
+      '#title' => t('Title'),
       '#maxlength' => 127,
       '#default_value' => $pdf_form->title,
       '#required' => TRUE,
   );
 
-  // @@TODO: 
-  // They can upload a PDF any time, but fields will only be generated on add.  Don't want to purge existing fields, 
-  // however a user might have accidently uploaded an old template and discover much later (if it's substantially different, just 
-  // create a new Form    
+  // @@TODO:
+  // They can upload a PDF any time, but fields will only be generated on add.  Don't want to purge existing fields,
+  // however a user might have accidently uploaded an old template and discover much later (if it's substantially different, just
+  // create a new Form
   $form['pdf_info'] = array(
-  	'#type' => 'fieldset',
+    '#type' => 'fieldset',
     '#title' => 'PDF Form information',
     '#collapsed' => true,
-  );     
+  );
   $form['pdf_info']['submitted_pdf'] = array(
     '#type' => 'item',
     '#title' => t('Uploaded PDF'),
@@ -244,7 +244,7 @@ function fillpdf_form_edit(&$form_state, $fid) {
     '#title' => 'Form Info',
     '#value' => "Form ID: [$fid].  Populate this form with node IDs, such as /fillpdf?fid=$fid&nid=10<br/>",
   );
-  
+
   $form['extra'] = array(
     '#type' => 'fieldset',
     '#title' => t('Additional PDF settings'),
@@ -295,22 +295,22 @@ function fillpdf_form_edit(&$form_state, $fid) {
       '#value' => t('Delete'),
    );
   $form['#pdf_form'] = $pdf_form;
-  
+
   // @@TODO: order by weight, and add dragable ala http://www.computerminds.co.uk/quick-guide-using-drupal-add-tabledrag-and-enjoying-jquery-drag-and-drop-loveliness
   $q = db_query('SELECT * FROM {fillpdf_fields} WHERE fid = %d', $fid);
   $header = array(t('Label'), t('PDF-field key'), t('Value'), t('Transformed'), array('data' => t('Operations'), 'colspan' => 2) );
   while($field = db_fetch_object($q)){
     $row = array(
-    	check_plain($field->label), //editable
-    	check_plain($field->pdf_key),
-    	$field->value, //editable, expandable
+      check_plain($field->label), //editable
+      check_plain($field->pdf_key),
+      $field->value, //editable, expandable
       ($field->replacements ? 'Yes' : 'No'),
-    	l(t('Edit'), "admin/content/fillpdf/$fid/edit/{$field->pdf_key}"),
-    	l(t('Delete'), "admin/content/fillpdf/$fid/delete/{$field->pdf_key}"),
-    	);
+      l(t('Edit'), "admin/content/fillpdf/$fid/edit/{$field->pdf_key}"),
+      l(t('Delete'), "admin/content/fillpdf/$fid/delete/{$field->pdf_key}"),
+      );
     $rows[] = $row;
   }
-  
+
   $form['existing_fields'] = array(
     '#type' => 'markup',
     '#value' => '<br/><br/>'.theme('table', $header, $rows, array('id' => 'fillpdf_fields')),
@@ -327,7 +327,7 @@ function fillpdf_form_edit(&$form_state, $fid) {
     '#value' => l(t('Import a previous export into this PDF'), "admin/content/fillpdf/{$pdf_form->fid}/import"),
     '#suffix' => '</div>',
   );
-  
+
   return $form;
 }
 
@@ -348,11 +348,11 @@ function fillpdf_form_edit_submit($form, &$form_state) {
 }
 
 /**
- * Delete form confirmation 
+ * Delete form confirmation
  */
 function fillpdf_form_delete_confirm(&$form_state, $pdf_form) {
   if (is_numeric(arg(3))) {
-    $pdf_form = db_fetch_object(db_query("SELECT * FROM {fillpdf_forms} WHERE fid = %d", arg(3)));    
+    $pdf_form = db_fetch_object(db_query("SELECT * FROM {fillpdf_forms} WHERE fid = %d", arg(3)));
   }
   if (!$pdf_form) {
     drupal_not_found();
@@ -369,7 +369,7 @@ function fillpdf_form_delete_confirm(&$form_state, $pdf_form) {
 }
 
 /**
- * Delete form submit 
+ * Delete form submit
  */
 function fillpdf_form_delete_confirm_submit($form, &$form_state) {
   db_query("DELETE FROM {fillpdf_fields} WHERE fid = %d", $form['#pdf_form']->fid);
@@ -381,9 +381,9 @@ function fillpdf_form_delete_confirm_submit($form, &$form_state) {
 
 /**
  * Export an importable array of PDF field key -> Label, Value mappings.
- * The array key is the PDF field key and the value is another array containing the label and 
+ * The array key is the PDF field key and the value is another array containing the label and
  * the value (properly keyed).
- * 
+ *
  * @param mixed $pdf_form The FillPDF form ID.
  */
 function fillpdf_form_export($pdf_form) {
@@ -398,7 +398,7 @@ function fillpdf_form_export($pdf_form) {
   $export_array = array();
   while ($field = db_fetch_object($fields)) {
     $export_array[$field->pdf_key] = array(
-      'label' => $field->label, 
+      'label' => $field->label,
       'value' => $field->value,
       'replacements' => $field->replacements,
     );
@@ -429,9 +429,9 @@ function fillpdf_export_form($form_state, $code) {
 
 /**
  * Based loosely on Node Export's import form. Import the code and configure the DB settings.
- * 
- * @param mixed $form_state 
- * @param mixed $pdf_form 
+ *
+ * @param mixed $form_state
+ * @param mixed $pdf_form
  */
 function fillpdf_form_import_form(&$form_state, $pdf_form) {
   if (is_numeric($pdf_form)) {
@@ -539,7 +539,7 @@ function fillpdf_field($op, $fid, $pdf_key=NULL) {
   }
 
   if ($op == 'add') {
-    drupal_set_title(check_plain($pdf_form->title));    
+    drupal_set_title(check_plain($pdf_form->title));
   }
   else if ($op != 'edit') {
     return fillpdf_form_overview($pdf_form);
@@ -624,12 +624,12 @@ function fillpdf_field_edit(&$form_state, $pdf_form, $field) {
 
   $form['#pdf_field'] = $field;
   $form['#pdf_form'] = $pdf_form;
-  
+
   return $form;
 }
 
 function fillpdf_field_edit_validate($form, &$form_state) {
-  if (db_result( db_query("SELECT * FROM {fillpdf_fields} WHERE fid = %d AND pdf_key = '%s'", 
+  if (db_result( db_query("SELECT * FROM {fillpdf_fields} WHERE fid = %d AND pdf_key = '%s'",
       $form['#pdf_form']->fid, $form_state['values']['pdf_key'] ))) {
     if ($form['#pdf_field'] && $form['#pdf_field']->pdf_key == $form_state['values']['pdf_key'] ) return;
   else form_set_error('pdf_key', t('A field with this pdf_key already exists. Choose another pdf_key.'));
@@ -643,7 +643,7 @@ function fillpdf_field_edit_submit($form, &$form_state) {
       return;
     }
     $edit_field = (object)$form_state['values'];
-    fillpdf_update_field($form['#pdf_form'], $edit_field, $form['#pdf_field']->pdf_key);   
+    fillpdf_update_field($form['#pdf_form'], $edit_field, $form['#pdf_field']->pdf_key);
   }
   else {
     //add a new field
@@ -656,7 +656,7 @@ function fillpdf_field_edit_submit($form, &$form_state) {
 
 
 function fillpdf_field_delete_confirm(&$form_state, $fid, $pdf_key) {
-  $pdf_form = db_fetch_object(db_query("SELECT * FROM {fillpdf_forms} WHERE fid = %d", $fid));  
+  $pdf_form = db_fetch_object(db_query("SELECT * FROM {fillpdf_forms} WHERE fid = %d", $fid));
 
   if ($pdf_key) {
     $field = db_fetch_object(db_query("SELECT * FROM {fillpdf_fields} WHERE pdf_key = '%s' AND fid = %d", $pdf_key, $fid));
@@ -668,7 +668,7 @@ function fillpdf_field_delete_confirm(&$form_state, $fid, $pdf_key) {
 
   $form['#pdf_field'] = $field;
   $form['#pdf_form'] = $pdf_form;
-  
+
   return confirm_form($form,
     t('Are you sure you want to delete the field %pdf_key?', array('%pdf_key' => $field->pdf_key)),
     'admin/content/fillpdf/'. $pdf_form->fid,
@@ -688,7 +688,7 @@ function fillpdf_field_delete_confirm_submit($form, &$form_state) {
  * Stores the updated $field in the database
  */
 function fillpdf_update_field(&$pdf_form, &$field, $old_key) {
-  db_query("UPDATE {fillpdf_fields} SET label = '%s', pdf_key='%s', 
+  db_query("UPDATE {fillpdf_fields} SET label = '%s', pdf_key='%s',
            value = '%s', replacements='%s' WHERE fid = %d AND pdf_key = '%s'",
            $field->label, $field->pdf_key, $field->value, $field->replacements,
            $pdf_form->fid, $old_key);
diff --git a/fillpdf.info b/fillpdf.info
index 8550b44..42166fa 100644
--- a/fillpdf.info
+++ b/fillpdf.info
@@ -4,4 +4,4 @@ package = Other
 core = 6.x
 
 dependencies[] = content
-dependencies[] = token
\ No newline at end of file
+dependencies[] = token
diff --git a/fillpdf.install b/fillpdf.install
index afd75c7..5e81c44 100644
--- a/fillpdf.install
+++ b/fillpdf.install
@@ -5,10 +5,10 @@
  * @file
  * Install
  */
- 
+
 function fillpdf_schema() {
-  $schema = array();  
-  
+  $schema = array();
+
   $schema['fillpdf_forms'] = array(
     'fields' => array(
       'fid' =>     array('type' => 'serial', 'not null' => TRUE),
@@ -19,7 +19,7 @@ function fillpdf_schema() {
     ),
     'primary key' => array('fid')
   );
-   
+
   $schema['fillpdf_fields'] = array(
     'fields' => array(
       'fid' =>      array('type' => 'int', 'not null' => TRUE),
@@ -30,7 +30,7 @@ function fillpdf_schema() {
     ),
     'primary key' => array('fid', 'pdf_key')
   );
-   
+
   return $schema;
 }
 
diff --git a/fillpdf.module b/fillpdf.module
index c5441b5..e9aa828 100644
--- a/fillpdf.module
+++ b/fillpdf.module
@@ -1,5 +1,5 @@
 <?php
- 
+
 /**
  * @file
  * Allows mappings of PDFs to site content
@@ -41,13 +41,13 @@ function fillpdf_menu() {
     $items = array();
 
     // fillpdf&fid=10&nids[]=1&webforms[0][nid]=2&webforms[0][sid]=3
-    $items['fillpdf'] = array( 
+    $items['fillpdf'] = array(
       'page callback' => 'fillpdf_parse_uri',
     // Can't use access callback.  We need the arguments, but they're passed as $GET.  Will access-check in fillpdf_merge_pdf
-      'access arguments' => array('access content'), 
+      'access arguments' => array('access content'),
       'type' => MENU_CALLBACK,
     );
-    
+
     // ------- Config ---------------------------
     $items['admin/settings/fillpdf'] = array(
       'title' => 'Fill PDF Settings',
@@ -76,23 +76,23 @@ function fillpdf_menu() {
       'page arguments' => array('fillpdf_form_delete_confirm', 3),
       'access arguments' => $access,
       'type' => MENU_CALLBACK
-    );  
+    );
     $items['admin/content/fillpdf/%/export'] = array(
       'title' => t('Export Fill PDF Field Mappings'),
       'page callback' => 'fillpdf_form_export',
       'page arguments' => array(3),
       'access arguments' => $access,
       'type' => MENU_CALLBACK
-    );  
+    );
     $items['admin/content/fillpdf/%/import'] = array(
       'title' => t('Import Fill PDF Field Mappings'),
       'page callback' => 'drupal_get_form',
       'page arguments' => array('fillpdf_form_import_form', 3),
       'access arguments' => $access,
       'type' => MENU_CALLBACK
-    );  
+    );
   //}else if (is_numeric(arg(4))) {
-    
+
     // --------- Fields ------------------------
     $items['admin/content/fillpdf/%/add'] = array(
       'title' => 'Add field',
@@ -127,28 +127,28 @@ function fillpdf_perm() {
 
 /**
  * Gets a link to the prinable PDF, merged with the passed-in data
- * @param array/int $nids or $nid, if you pass in one value it will merge with that node.  
- *  If array, it will merge with multiple nodes, with later nids overriding previous ones. 
- * @param array $webforms Array of webforms, of this strucure: array('nid'=>1, 'sid'=>1) 
+ * @param array/int $nids or $nid, if you pass in one value it will merge with that node.
+ *  If array, it will merge with multiple nodes, with later nids overriding previous ones.
+ * @param array $webforms Array of webforms, of this strucure: array('nid'=>1, 'sid'=>1)
  * @param bool $sample True if you want to populate the form with its own field-names (to get a gist of PDF)
  */
 function fillpdf_pdf_link($fid, $nids = null, $webform_arr = null, $sample = false){
-	
+
 	if(is_array($nids)){
 		$nids_uri = '&nids[]=' .implode('&nids[]=', $nids);
 	}elseif (isset($nids)){
 	  $nids_uri = "&nids[]={$nids}";
 	}
-	
+
 	if(is_array($webform_arr)){
 		if($webform_arr['nid']) // didn't pass in as array(array('nid','sid'))
 		  $webform_arr = array($webform_arr);
 		foreach($webform_arr as $key => $webform)
-		  $webforms_uri .= "&webforms[{$key}][nid]={$webform['nid']}"; 
+		  $webforms_uri .= "&webforms[{$key}][nid]={$webform['nid']}";
 		  $webforms_uri .= $webform['sid'] ? "&webforms[{$key}][sid]={$webform['sid']}" : "";
 	}
 	$sample = $sample ? '&sample=true' : '';
-	
+
 	return url('', array('absolute'=>true))."fillpdf?fid={$fid}{$nids_uri}{$webforms_uri}{$sample}";
 }
 
@@ -156,18 +156,18 @@ function fillpdf_pdf_link($fid, $nids = null, $webform_arr = null, $sample = fal
 
 /**
  * Get the data and form that need to be merged, from the $_GET, and print the PDF
- * @seealso fillpdf_pdf_link for $_GET params 
+ * @seealso fillpdf_pdf_link for $_GET params
  */
 function fillpdf_parse_uri(){
-    $sample = $_GET['sample']; // is this just the PDF populated with sample data? 
+    $sample = $_GET['sample']; // is this just the PDF populated with sample data?
     $fid = $_GET['fid'];
     $nids = $webforms = array();
     $force_download = FALSE;
     $flatten = TRUE;
     if( $_GET['nid'] || $_GET['nids'] )
-      $nids = ( $_GET['nid'] ? array($_GET['nid']) : $_GET['nids'] ); 
+      $nids = ( $_GET['nid'] ? array($_GET['nid']) : $_GET['nids'] );
     if( $_GET['webform'] || $_GET['webforms'] )
-      $webforms = ( $_GET['webform'] ? array($_GET['webform']) : $_GET['webforms'] ); 
+      $webforms = ( $_GET['webform'] ? array($_GET['webform']) : $_GET['webforms'] );
     if (isset($_GET['download']) && (int) $_GET['download'] == 1) {
       $force_download = TRUE;
     }
@@ -182,7 +182,7 @@ function fillpdf_parse_uri(){
  * @return doesn't return anything, actually constructs a page from scratch (pdf content-type)
  *   and sends it to the browser or saves it, depending on if a custom path is configured
  *   or not.
- * @seealso fillpdf_pdf_link for $_GET params 
+ * @seealso fillpdf_pdf_link for $_GET params
  */
 function fillpdf_merge_pdf($fid, $nids = null, $webform_arr = null, $sample = null, $force_download = FALSE, $skip_access_check = FALSE, $flatten = TRUE) {
   // Case 1: No $fid
@@ -190,7 +190,7 @@ function fillpdf_merge_pdf($fid, $nids = null, $webform_arr = null, $sample = nu
   	drupal_set_message('Fillpdf Form ID required to print a PDF', 'warning');
   	drupal_goto();
   }
-  
+
   $fillpdf_info = db_fetch_object(db_query("SELECT title, url, destination_path, replacements FROM {fillpdf_forms} WHERE fid=%d", $fid));
   $fillpdf_info->replacements = _fillpdf_replacements_to_array($fillpdf_info->replacements);
   // Case 2: Only $fid -- just give them empty pdf
@@ -199,9 +199,9 @@ function fillpdf_merge_pdf($fid, $nids = null, $webform_arr = null, $sample = nu
     header("Location: ".$host.'/'.$fillpdf_info->url);
     exit;
   }
-    
+
 	global $user;
-  
+
 	$nodes = $webforms = array();
   // Nodes
   if(is_array($nids)){
@@ -210,7 +210,7 @@ function fillpdf_merge_pdf($fid, $nids = null, $webform_arr = null, $sample = nu
   }
   // Webforms
   if(module_exists('webform') && is_array($webform_arr)){
-  	
+
   	// Load the submissions inc depending on webform-2.x or webform-3.x
   	$webform_info_file = drupal_parse_info_file(drupal_get_path('module', 'webform').'/webform.info');
   	if(strstr($webform_info_file['version'], "6.x-2")===FALSE){
@@ -218,13 +218,13 @@ function fillpdf_merge_pdf($fid, $nids = null, $webform_arr = null, $sample = nu
   	}else{
     	module_load_include('inc', 'webform', 'webform_submissions');
   	}
-    
+
     foreach($webform_arr as $webform){
       if(!$webform['sid']){ // user didn't specify submission-id, meaning they want most recent
-        $webform['sid'] = db_result(db_query('select sid from {webform_submissions} 
+        $webform['sid'] = db_result(db_query('select sid from {webform_submissions}
           where nid=%d and uid=%d order by submitted desc', $webform['nid'], $user->uid));
       }
-      $webforms[] = array( 
+      $webforms[] = array(
         'webform' => node_load($webform['nid']),
         'submission' => webform_get_submission($webform['nid'], $webform['sid']) );
     }
@@ -239,7 +239,7 @@ function fillpdf_merge_pdf($fid, $nids = null, $webform_arr = null, $sample = nu
       exit();
     }
   }
-    
+
   $fields = $token_objects = array();
   $query = db_query("SELECT * FROM {fillpdf_fields} WHERE fid=%d", $fid);
   while ($obj = db_fetch_object($query)) {
@@ -255,8 +255,8 @@ function fillpdf_merge_pdf($fid, $nids = null, $webform_arr = null, $sample = nu
     else {
       // multiple nids, #516840
       // we want the last nid in $_GET to override previous ones (aka, of fillpdf?nids[]=1&nids[]=2, 2 wins)
-      $nodes = array_reverse($nodes); 
-      $webforms = array_reverse($webforms); 
+      $nodes = array_reverse($nodes);
+      $webforms = array_reverse($webforms);
 
       // --- node token replacements
       if (!empty($nodes)) {
@@ -439,7 +439,7 @@ function fillpdf_merge_pdf_access($nodes = array(), $webforms = array()) {
  * @param string $method The service or program being used. Possible values: local, remote, pdftk. Currently, only pdftk is supported.
  * @param array $fields The fields to merge into the PDF. Should be retrieved from the {fillpdf_fields} table.
  * @param mixed $fillpdf When in URL mode, this is the record from {fillpdf_forms}. When in Stream mode, this is the PDF data.
- * @param string $mode A special flag to control the behavior of this function. URL mode merges using a PDF on the 
+ * @param string $mode A special flag to control the behavior of this function. URL mode merges using a PDF on the
  *   file system and Stream mode merges using the value of $fillpdf directly. Possible values: url, stream.
  */
 function fillpdf_execute_merge($method, $fields, $fillpdf, $mode = 'url', $flatten = TRUE) {
@@ -481,15 +481,15 @@ function fillpdf_parse_pdf($fid) {
   $content = _fillpdf_get_file_contents($filename, '<front>');
   $fillpdf_remote_service= variable_get('fillpdf_remote_service', true);
   $fillpdf_local_service = variable_get('fillpdf_local_service', TRUE);
-  
+
   // use fillpdf-service.com's xmlrpc service (must be registered)
   if($fillpdf_remote_service){
 		$result = _fillpdf_xmlrpc_request(DEFAULT_SERVLET_URL, 'parse_pdf_fields', base64_encode($content));
 		if($result->error == true)
-		  drupal_goto("admin/content/fillpdf"); //after setting error message  
+		  drupal_goto("admin/content/fillpdf"); //after setting error message
 		$fields = $result->data;
   }
-  
+
 	// use local php/java bridge (must have Tomcat & JavaBridge installed on VPS or dedicated
   elseif ($fillpdf_local_service) {
     $require = drupal_get_path('module', 'fillpdf').'/lib/JavaBridge/java/Java.inc';
@@ -509,7 +509,7 @@ function fillpdf_parse_pdf($fid) {
   }
 
   //create fields
-  foreach ((array) $fields as $key=>$arr) {    
+  foreach ((array) $fields as $key=>$arr) {
     if ($arr['type']) { // Don't store "container" fields
       $arr['name'] = str_replace('&#0;', '', $arr['name']); // pdftk sometimes inserts random &#0; markers - strip these out. NOTE: This may break forms that actually DO contain this pattern, but 99%-of-the-time functionality is better than merge failing due to improper parsing.
       $field = new stdClass();
@@ -518,15 +518,15 @@ function fillpdf_parse_pdf($fid) {
       $field->label = $arr['name'];
       drupal_write_record('fillpdf_fields', $field);
     }
-  }  
+  }
 }
 
 /**
- * Utility function to allow other functions to parse PDFs with the various methods in a consistent way. 
- * 
+ * Utility function to allow other functions to parse PDFs with the various methods in a consistent way.
+ *
  * @param string $method The service or program being used. Possible values: local, remote, pdftk. Currently, only pdftk is supported.
  * @param mixed $fillpdf When in URL mode, this is the filename to the PDF to parse. When in Stream mode, this is the PDF data.
- * @param string $mode A special flag to control the behavior of this function. URL mode merges using a PDF on the  
+ * @param string $mode A special flag to control the behavior of this function. URL mode merges using a PDF on the
  *   file system and Stream mode merges using the value of $fillpdf directly. Possible values: url, stream.
  */
 function fillpdf_execute_parse($method, $fillpdf, $mode = 'url') {
@@ -570,7 +570,7 @@ function fillpdf_execute_parse($method, $fillpdf, $mode = 'url') {
 
 function _fillpdf_get_file_contents($filepath, $error_goto = null){
   if($error_goto && !(file_exists($filepath))){
-    drupal_set_message("{$filepath} does not exist.  Check your 
+    drupal_set_message("{$filepath} does not exist.  Check your
       filesystem settings, as well as http://drupal.org/node/764936", 'error');
     drupal_goto($error_goto);
   }
@@ -591,13 +591,13 @@ function _fillpdf_xmlrpc_request($url, $method){
   else if ($result==false || xmlrpc_error()) {
       $error = xmlrpc_error();
       $ret->error = true;
-      drupal_set_message("There was a problem contacting the Fill PDF service.  
+      drupal_set_message("There was a problem contacting the Fill PDF service.
         It maybe be down, or you may not have internet access.  [ERROR {$error->code}: {$error->message}]", 'error');
   }
   else{
     $ret->data = $result['data'];
     $ret->error = false;
-  }  
+  }
   return $ret;
 }
 
diff --git a/webform_tokens.inc b/webform_tokens.inc
index 581dfb3..67bfb35 100644
--- a/webform_tokens.inc
+++ b/webform_tokens.inc
@@ -10,22 +10,22 @@ function fillpdf_token_values($type, $object = NULL, $options = array()) {
 //    case 'global':
     case 'webform':
       $submission = $object;
-      
+
       $tokens['webform-meta-nid'] = $submission->nid;
       $tokens['webform-meta-sid'] = $submission->sid;
       $tokens['webform-meta-uid'] = $submission->uid;
       $tokens['webform-meta-remote_addr'] = $submission->remote_addr;
       $tokens['webform-meta-submitted'] = $submission->submitted;
-      
+
       $fields = array();
       $q = db_query('SELECT cid, form_key, type, extra FROM {webform_component} WHERE nid = %d', $submission->nid);
-      while ($component = db_fetch_array($q)){ 
+      while ($component = db_fetch_array($q)){
         // initialize empty fields, so they don't show as [webform-val-text_field] in the pdf
         if( !is_array($submission->data[$component['cid']]) )
          $submission->data[$component['cid']] = array();
-           
+
         // add cid, form_key, etc along with ['value']
-        $submission->data[$component['cid']] += $component; 
+        $submission->data[$component['cid']] += $component;
       }
       $tokens += _fillpdf_get_tokens_from_components($submission); // modify the submission
       return $tokens;
@@ -39,10 +39,10 @@ function fillpdf_token_list($type = 'all') {
     $tokens['webform']['webform-meta-uid'] = t("The user's id who submitted the webform");
     $tokens['webform']['webform-meta-remote_addr'] = t("The user's ip address who submitted the webform");
     $tokens['webform']['webform-meta-submitted'] = t("The date the webform was submitted");
-    
+
     $fields = array();
     $q = db_query('SELECT name, form_key FROM {webform_component}');
-    while ($component = db_fetch_array($q)){ 
+    while ($component = db_fetch_array($q)){
       $tokens['webform']["webform-val-{$component['form_key']}"] = t("The value for webform component [{$component['name']}]");
     }
     return $tokens;
@@ -53,15 +53,15 @@ function _fillpdf_get_tokens_from_components($submission){
   $tokens = array();
   foreach($submission->data as $cid => $component){
 //    $tokens["webform-val-{$component['form_key']}"] = $submission->data[$component['cid']]['value'][0];
-    
-    
+
+
     // First, unserialize everything so we can work with them as arrays
     switch ($component['type']) {
       case 'fieldset':
       case 'pagebreak':
         break;
       default:
-        
+
         $fullvalue = false;
         // For components with selectable options (including grids), make an array of options in the form array(safe_key => "Some readable option", ...)
         $options = false;
@@ -91,7 +91,7 @@ function _fillpdf_get_tokens_from_components($submission){
           $component['extra']['options'] = false;
         }
     }
-    
+
     if ($component['value']) {
       switch ($component['type']) {
         case 'date':
@@ -128,7 +128,7 @@ function _fillpdf_get_tokens_from_components($submission){
     if ($fullvalue) {
       $tokens['webform-fullval-' . $component['form_key']] = $fullvalue;
     }
-    
+
   }
   return $tokens;
-}
\ No newline at end of file
+}
diff --git a/xfdf.inc b/xfdf.inc
index 28ce7e9..f1521c8 100644
--- a/xfdf.inc
+++ b/xfdf.inc
@@ -2,10 +2,10 @@
 
 /**
  * createXFDF
- * 
+ *
  * Tales values passed via associative array and generates XFDF file format
  * with that data for the pdf address sullpiled.
- * 
+ *
  * @param string $file The pdf file - url or file path accepted
  * @param array $info data to use in key/value pairs no more than 2 dimensions
  * @param string $enc default UTF-8, match server output: default_charset in php.ini
@@ -41,23 +41,23 @@ function print_fields($info) {
     $str .= "='". escape_string($val) ."';";
   }
   eval($str);
-  
+
   $str='';
-  foreach ($fields as $field => $val) {    
+  foreach ($fields as $field => $val) {
     print_fields_recurse($field, $val, $str);
   }
   return $str;
 }
 
 function print_fields_recurse($field, $val, &$str) {
-  
+
   $str .= '<field name="'. $field .'">'."\n";
-  if (is_array($val)) {    
+  if (is_array($val)) {
     foreach ($val as $field => $val) {
       print_fields_recurse($field, $val, $str);
     }
   }
-  else {    
+  else {
     $str .= '<value>'. $val .'</value>'."\n";
   }
   $str .= '</field>'."\n";
