diff --git a/properties.admin.inc b/properties.admin.inc
index 03e7e09..0ecefb2 100644
--- a/properties.admin.inc
+++ b/properties.admin.inc
@@ -120,6 +120,7 @@ function properties_admin_attributes_list($form, $form_state) {
     '#header' => $header,
     '#empty' => t('No attributes found.'),
   );
+
   $form['content']['pager']['#markup'] = theme('pager');
   return $form;
 }
@@ -446,7 +447,6 @@ function properties_admin_categories_add_another($form, &$form_state) {
   drupal_set_message(t('Category created.'));
 }
 
-
 /**
  * Returns HTML for the attributes table in the category table.
  *
@@ -521,7 +521,6 @@ function properties_admin_update_label_js($form, &$form_state) {
   return $form['attributes'];
 }
 
-
 /**
  * Submit handler for the "Add another item" button of a field form.
  *
@@ -597,4 +596,4 @@ function properties_admin_categories_delete($form, &$form_state, $category) {
 function properties_admin_categories_delete_submit($form, &$form_state) {
   properties_category_delete($form_state['values']['category']);
   drupal_set_message(t('Category deleted.'));
-}
\ No newline at end of file
+}
diff --git a/properties.module b/properties.module
index 6f18df0..6ac9eee 100644
--- a/properties.module
+++ b/properties.module
@@ -1,5 +1,9 @@
 <?php
 
+/**
+ * @file
+ * This module provides a dynamic property field that can contain an unlimited number of attribute value pairs.
+ */
 
 /**
  * Implements hook_permission().
@@ -275,7 +279,7 @@ function properties_field_presave($entity_type, $entity, $field, $instance, $lan
       foreach ($category['properties'] as $property) {
         // If the attribute name was deleted, attribute is empty. Ignore these.
         if (empty($property['attribute'])) {
-          continue;;
+          continue;
         }
         // Add them in the sorted order to the items array.
         $items[] = array(
@@ -318,8 +322,6 @@ function properties_field_formatter_info() {
   );
 }
 
-
-
 /**
  * Implements hook_field_widget_info().
  */
@@ -348,7 +350,7 @@ function properties_empty_attribute() {
 }
 
 /**
- * Implements hook_field_widet_form().
+ * Implements hook_field_widget_form().
  */
 function properties_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
   $elements = array();
@@ -677,7 +679,6 @@ function properties_widget_remove_attribute($form, &$form_state) {
   $form_state['rebuild'] = TRUE;
 }
 
-
 /**
  * Submit callback to remove a category.
  */
diff --git a/properties_compare/properties_compare.module b/properties_compare/properties_compare.module
index a40ffaa..64d04f5 100644
--- a/properties_compare/properties_compare.module
+++ b/properties_compare/properties_compare.module
@@ -27,10 +27,11 @@ function properties_compare_menu() {
     'access arguments' => array('compare properties'),
     'type' => MENU_CALLBACK,
   );
+
   $items['properties/compare/delete/%/%'] = array(
     'title' => 'Delete from compare list',
     'page callback' => 'properties_compare_delete',
-    'page arguments' => array(3,4),
+    'page arguments' => array(3, 4),
     'file' => 'properties_compare.pages.inc',
     'access arguments' => array('compare properties'),
     'type' => MENU_CALLBACK,
@@ -106,7 +107,6 @@ function properties_compare_forms($form_id, $args) {
  * Form builder function; displays a form to add an entity to the compare list.
  */
 function properties_compare_add_form($form, &$form_state, $entity_type, $entity) {
-
   $form['entity_type'] = array(
     '#type' => 'value',
     '#value' => $entity_type,
@@ -436,4 +436,4 @@ function properties_compare_entity_info() {
     );
   }
   return $return;
-}
\ No newline at end of file
+}
diff --git a/properties_compare/properties_compare.pages.inc b/properties_compare/properties_compare.pages.inc
index 45f5bae..f9aa118 100644
--- a/properties_compare/properties_compare.pages.inc
+++ b/properties_compare/properties_compare.pages.inc
@@ -117,4 +117,4 @@ function properties_compare_page() {
 function properties_compare_delete($entity_type, $entity_id) {
   properties_compare_list_delete($entity_type, $entity_id);
   drupal_goto();
-}
\ No newline at end of file
+}
diff --git a/properties_compare/properties_compare.test b/properties_compare/properties_compare.test
index 98510c8..16f54f6 100644
--- a/properties_compare/properties_compare.test
+++ b/properties_compare/properties_compare.test
@@ -82,7 +82,7 @@ class PropertiesCompareTestCase extends PropertiesBaseTestCase {
     $patterns[] = t('Attributes');
     $patterns[] = $first_node->title;
     $patterns[] = $second_node->title;
-    $current_category = null;
+    $current_category = NULL;
     foreach ($first_node->{'field_' . $this->field_name}['und'] as $key => $item) {
       // Add the label of the category to the pattern if it changed.
       if (!$current_category || $item['category'] != $current_category->name) {
@@ -100,4 +100,4 @@ class PropertiesCompareTestCase extends PropertiesBaseTestCase {
     $pattern = '/' . implode('.*', $patterns) . '/s';
     $this->assertPattern($pattern, t('Comparison table content displayed in correct order.'));
   }
-}
\ No newline at end of file
+}
diff --git a/properties_sql/properties_sql.module b/properties_sql/properties_sql.module
index c960bf2..8197633 100644
--- a/properties_sql/properties_sql.module
+++ b/properties_sql/properties_sql.module
@@ -1,5 +1,9 @@
 <?php
 
+/**
+ * @file
+ * This module implements the attribute and category API with a SQL backend.
+ */
 
 /**
  * Save an attribute object.
@@ -11,7 +15,7 @@ function properties_sql_properties_attribute_save($attribute) {
   db_merge('properties_attribute')
     ->key(array('name' => $attribute->name))
     ->fields(array(
-        'label' => $attribute->label,
+      'label' => $attribute->label,
     ))
     ->execute();
 }
@@ -203,7 +207,6 @@ function properties_sql_properties_category_load_paging($per_page, array $option
     ->fetchAllAssoc('name');
 }
 
-
 /**
  * Save a template object.
  *
@@ -214,7 +217,7 @@ function properties_sql_properties_template_save($template) {
   db_merge('properties_template')
     ->key(array('name' => $template->name))
     ->fields(array(
-        'label' => $template->label,
+      'label' => $template->label,
     ))
     ->execute();
 
@@ -235,7 +238,6 @@ function properties_sql_properties_template_save($template) {
   $insert->execute();
 }
 
-
 /**
  * Delete a Template.
  *
@@ -252,8 +254,6 @@ function properties_sql_properties_template_delete($template) {
     ->execute();
 }
 
-
-
 /**
  * Load a template based on the name.
  *
@@ -265,7 +265,6 @@ function properties_sql_properties_template_load($name) {
   return reset($templates);
 }
 
-
 /**
  * Load multiple templates based on their names.
  *
@@ -325,4 +324,4 @@ function properties_sql_properties_template_load_paging($per_page, array $option
   return $query
     ->execute()
     ->fetchAllAssoc('name');
-}
\ No newline at end of file
+}
diff --git a/properties_sql/properties_sql.test b/properties_sql/properties_sql.test
index 0db023a..0f2a97a 100644
--- a/properties_sql/properties_sql.test
+++ b/properties_sql/properties_sql.test
@@ -1,6 +1,7 @@
 <?php
 
 /**
- * This module is tested with the tests from the properties module.
+ * @file
+ * This file is intentionally left blank since the module is tested with the tests from the properties module.
  */
 
diff --git a/properties_template/properties_template.admin.inc b/properties_template/properties_template.admin.inc
index 36ab19c..bcf9998 100644
--- a/properties_template/properties_template.admin.inc
+++ b/properties_template/properties_template.admin.inc
@@ -1,6 +1,5 @@
 <?php
 
-
 /**
  * @file
  * Contains admin menu callbacks for properties_template.module.
@@ -11,16 +10,16 @@
  */
 function properties_template_admin_templates_list() {
   $header = array(
-      array(
-          'data' => t('Name'),
-          'field' => 'name',
-      ),
-      array(
-          'data' => t('Label'),
-          'field' => 'label',
-          'sort' => 'asc',
-      ),
-      t('Operations'),
+    array(
+      'data' => t('Name'),
+      'field' => 'name',
+    ),
+    array(
+      'data' => t('Label'),
+      'field' => 'label',
+      'sort' => 'asc',
+    ),
+    t('Operations'),
   );
   $templates = properties_template_load_paging(20, array('header' => $header));
   $rows = array();
@@ -29,9 +28,9 @@ function properties_template_admin_templates_list() {
     $links = array(l(t('edit'), 'admin/config/content/properties/templates/edit/' . $template->name, $url_options), l(t('delete'), 'admin/config/content/properties/templates/delete/' . $template->name, $url_options));
 
     $rows[] = array(
-        check_plain($template->name),
-        check_plain($template->label),
-        implode(' ', $links),
+      check_plain($template->name),
+      check_plain($template->label),
+      implode(' ', $links),
     );
   }
   return theme('table', array('rows' => $rows, 'header' => $header, 'empty' => t('No templates found.')));
@@ -44,10 +43,10 @@ function properties_template_admin_templates_form($form, &$form_state, $template
   if (!isset($form_state['template'])) {
     if (isset($_GET['entity_type'])) {
       $template = (object) array(
-          'label' => '',
-          'name' => '',
-          'categories' => array(),
-          'new' => TRUE,
+        'label' => '',
+        'name' => '',
+        'categories' => array(),
+        'new' => TRUE,
       );
 
       $entity_type = $_GET['entity_type'];
@@ -76,12 +75,13 @@ function properties_template_admin_templates_form($form, &$form_state, $template
           }
         }
       }
-    } else if (empty($template) || !is_object($template)) {
+    }
+    elseif (empty($template) || !is_object($template)) {
       $template = (object) array(
-          'label' => '',
-          'name' => '',
-          'categories' => array(),
-          'new' => TRUE,
+        'label' => '',
+        'name' => '',
+        'categories' => array(),
+        'new' => TRUE,
       );
     }
     $form_state['template'] = $template;
@@ -98,31 +98,31 @@ function properties_template_admin_templates_form($form, &$form_state, $template
   if ($add_empty) {
     // Use a random id for these to trick out browsers.
     $form_state['template']->categories[] = (object) array(
-        'name' => '',
-        'label' => '',
-        'weight' => count($form_state['template']->categories),
+      'name' => '',
+      'label' => '',
+      'weight' => count($form_state['template']->categories),
     );
   }
 
   drupal_add_css(drupal_get_path('module', 'properties') . '/properties_admin.css');
 
   $form['label'] = array(
-      '#title' => t('Template label'),
-      '#type' => 'textfield',
-      '#default_value' => $form_state['template']->label,
-      '#maxlength' => 255,
-      '#required' => TRUE,
+    '#title' => t('Template label'),
+    '#type' => 'textfield',
+    '#default_value' => $form_state['template']->label,
+    '#maxlength' => 255,
+    '#required' => TRUE,
   );
 
   $form['name'] = array(
-      '#type' => 'machine_name',
-      '#default_value' => $form_state['template']->name,
-      '#maxlength' => 32,
-      '#disabled' => empty($form_state['template']->new),
-      '#machine_name' => array(
-          'exists' => 'properties_template_load',
-      ),
-      '#description' => t('A unique machine-readable name for this category. It must only contain lowercase letters, numbers, and underscores. This name will be used when using this category.'),
+    '#type' => 'machine_name',
+    '#default_value' => $form_state['template']->name,
+    '#maxlength' => 32,
+    '#disabled' => empty($form_state['template']->new),
+    '#machine_name' => array(
+      'exists' => 'properties_template_load',
+    ),
+    '#description' => t('A unique machine-readable name for this category. It must only contain lowercase letters, numbers, and underscores. This name will be used when using this category.'),
   );
 
   $categories = array();
@@ -133,76 +133,77 @@ function properties_template_admin_templates_form($form, &$form_state, $template
     }
     $element = array();
     $element['category'] = array(
-        '#type' => 'textfield',
-        '#default_value' => $category->name,
-        '#autocomplete_path' => 'properties_autocomplete/category',
-        '#ajax' => array(
-            'callback' => 'properties_admin_update_label_js',
-            'wrapper' => 'attributes-wrapper',
-            'effect' => 'fade',
-        ),
+      '#type' => 'textfield',
+      '#default_value' => $category->name,
+      '#autocomplete_path' => 'properties_autocomplete/category',
+      '#ajax' => array(
+        'callback' => 'properties_admin_update_label_js',
+        'wrapper' => 'attributes-wrapper',
+        'effect' => 'fade',
+      ),
     );
     // TODO: add categories-wrapper
 
     $element['label'] = array(
-        '#markup' => $category->label,
+      '#markup' => $category->label,
     );
     // We name the element '_weight' to avoid clashing with elements
     // defined by widget.
     $element['_weight'] = array(
-        '#type' => 'weight',
-        '#title' => t('Weight for row @number', array('@number' => $delta)),
-        '#title_display' => 'invisible',
-        '#default_value' => $delta,
-        '#weight' => 100,
+      '#type' => 'weight',
+      '#title' => t('Weight for row @number', array('@number' => $delta)),
+      '#title_display' => 'invisible',
+      '#default_value' => $delta,
+      '#weight' => 100,
     );
     $categories[!empty($category->name) ? $category->name : $delta] = $element;
     $delta++;
   }
 
   $categories += array(
-      '#type' => 'fieldset',
-      '#theme' => 'properties_template_admin_templates_categories_form',
-      '#title' => t('Categories'),
-      '#description' => t('Configure the default categories of this template.'),
-      '#prefix' => '<div id="attributes-wrapper">',
-      '#suffix' => '</div>',
-      '#max_delta' => $delta,
-      '#tree' => TRUE,
+    '#type' => 'fieldset',
+    '#theme' => 'properties_template_admin_templates_categories_form',
+    '#title' => t('Categories'),
+    '#description' => t('Configure the default categories of this template.'),
+    '#prefix' => '<div id="attributes-wrapper">',
+    '#suffix' => '</div>',
+    '#max_delta' => $delta,
+    '#tree' => TRUE,
   );
   $categories['add_more'] = array(
-      '#type' => 'submit',
-      '#name' => 'categories_add_more',
-      '#value' => t('Add another category'),
-      '#categories' => array('class' => array('field-add-more-submit')),
-      '#limit_validation_errors' => array(array('categories')),
-      '#submit' => array('properties_template_admin_add_more_submit'),
-      '#ajax' => array(
-          'callback' => 'properties_template_admin_add_more_js',
-          'wrapper' => 'attributes-wrapper',
-          'effect' => 'fade',
-      ),
+    '#type' => 'submit',
+    '#name' => 'categories_add_more',
+    '#value' => t('Add another category'),
+    '#categories' => array('class' => array('field-add-more-submit')),
+    '#limit_validation_errors' => array(array('categories')),
+    '#submit' => array('properties_template_admin_add_more_submit'),
+    '#ajax' => array(
+      'callback' => 'properties_template_admin_add_more_js',
+      'wrapper' => 'attributes-wrapper',
+      'effect' => 'fade',
+    ),
   );
 
   $form['categories'] = $categories;
 
   if (empty($template->name)) {
     $form['add'] = array(
-        '#value' => t('Save'),
-        '#type' => 'submit',
-        '#submit' => array('properties_template_admin_templates_add'),
+      '#value' => t('Save'),
+      '#type' => 'submit',
+      '#submit' => array('properties_template_admin_templates_add'),
     );
 
     $form['add_another'] = array(
-        '#value' => t('Save and add another'),
-        '#type' => 'submit',
-        '#submit' => array('properties_template_admin_templates_add_another'),
+      '#value' => t('Save and add another'),
+      '#type' => 'submit',
+      '#submit' => array('properties_template_admin_templates_add_another'),
     );
-  } else {
+  }
+  else {
     $form['save'] = array(
-        '#value' => t('Save'),
-        '#type' => 'submit',
-        '#submit' => array('properties_template_admin_templates_save'),
+      '#value' => t('Save'),
+      '#type' => 'submit',
+      '#submit' => array('properties_template_admin_templates_save'),
     );
   }
   return $form;
@@ -221,15 +222,17 @@ function properties_template_admin_templates_form_validate($form, &$form_state)
     if (is_array($category) && isset($category['category'])) {
       if (empty($category['category'])) {
         $category_object = (object) array(
-            'label' => '',
-            'name' => '',
-            'weight' => count($form_state['template']->categories),
+          'label' => '',
+          'name' => '',
+          'weight' => count($form_state['template']->categories),
         );
         $form_state['template']->categories[$name] = $category_object;
-      } elseif ($category_object = properties_category_load($category['category'])) {
+      }
+      elseif ($category_object = properties_category_load($category['category'])) {
         $category_object->weight = count($form_state['template']->categories);
         $form_state['template']->categories[$category_object->name] = $category_object;
-      } else {
+      }
+      else {
         // Update empty category.
         $form_state['template']->categories[$category['category']]->name = $category['category'];
         $form_state['template']->categories[$category['category']]->label = isset($category['label']) ? $category['label'] : '';
@@ -299,15 +302,13 @@ function properties_template_admin_templates_add_another($form, &$form_state) {
  */
 function properties_template_admin_add_more_submit($form, &$form_state) {
   $form_state['template']->categories[] = (object) array(
-      'label' => '',
-      'name' => '',
-      'weight' => count($form_state['template']->categories),
+    'label' => '',
+    'name' => '',
+    'weight' => count($form_state['template']->categories),
   );
 
   foreach ($form_state['template']->categories as $name => $category) {
-
     if (is_int($name)) {
-
       unset($form_state['input']['categories'][$name]);
     }
   }
@@ -320,8 +321,8 @@ function properties_template_admin_add_more_submit($form, &$form_state) {
  */
 function properties_template_admin_templates_delete($form, &$form_state, $template) {
   $form['template'] = array(
-      '#type' => 'value',
-      '#value' => $template,
+    '#type' => 'value',
+    '#value' => $template,
   );
 
   return confirm_form($form, t('Delete template %template', array('%template' => $template->label)), '');
@@ -353,13 +354,13 @@ function theme_properties_template_admin_templates_categories_form($variables) {
   $required = !empty($element['#required']) ? '<span class="form-required" title="' . t('This field is required.') . '">*</span>' : '';
 
   $header = array(
-      array(
-          'data' => '<label>' . t('!title: !required', array('!title' => $element['#title'], '!required' => $required)) . "</label>",
-          'colspan' => 2,
-          'class' => array('field-label'),
-      ),
-      t('Label'),
-      t('Order'),
+    array(
+      'data' => '<label>' . t('!title: !required', array('!title' => $element['#title'], '!required' => $required)) . "</label>",
+      'colspan' => 2,
+      'class' => array('field-label'),
+    ),
+    t('Label'),
+    t('Order'),
   );
   $rows = array();
 
@@ -369,7 +370,8 @@ function theme_properties_template_admin_templates_categories_form($variables) {
   foreach (element_children($element) as $key) {
     if ($key === 'add_more') {
       $add_more_button = &$element[$key];
-    } else {
+    }
+    else {
       $items[] = &$element[$key];
     }
   }
@@ -382,14 +384,14 @@ function theme_properties_template_admin_templates_categories_form($variables) {
 
     $label = drupal_render($item['label']);
     $cells = array(
-        array('data' => '', 'class' => array('field-multiple-drag')),
-        array('data' => drupal_render($item), 'class' => array('properties-category-row-small')),
-        $label,
-        array('data' => $delta_element, 'class' => array('delta-order')),
+      array('data' => '', 'class' => array('field-multiple-drag')),
+      array('data' => drupal_render($item), 'class' => array('properties-category-row-small')),
+      $label,
+      array('data' => $delta_element, 'class' => array('delta-order')),
     );
     $rows[] = array(
-        'data' => $cells,
-        'class' => array('draggable'),
+      'data' => $cells,
+      'class' => array('draggable'),
     );
   }
 
diff --git a/properties_template/properties_template.module b/properties_template/properties_template.module
index 7432c37..ab21a93 100644
--- a/properties_template/properties_template.module
+++ b/properties_template/properties_template.module
@@ -1,5 +1,9 @@
 <?php
 
+/**
+ * @file
+ * This module implements the template functionality for properties.
+ */
 
 /**
  * Implements hook_permission().
@@ -155,14 +159,11 @@ function properties_template_delete($template) {
  * Implements hook_field_attach_form().
  */
 function properties_template_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) {
-
-
   // Load fields attached to the entity.
   $fields = field_info_instances($form['#entity_type'], $form['#bundle']);
 
   // Loop over fields.
   foreach ($fields as $field_name => $field) {
-
     // If langcode is empty, get default.
     if (empty($langcode)) {
       $langcode = field_language($entity_type, $entity, $field_name);
@@ -175,7 +176,7 @@ function properties_template_field_attach_form($entity_type, $entity, &$form, &$
 
         // Bail out if permissions are missing.
         if (!user_access('add properties templates')) {
-           return;
+          return;
         }
 
         // Prepare options for select.
@@ -204,13 +205,14 @@ function properties_template_field_attach_form($entity_type, $entity, &$form, &$
           ),
         );
         $form[$field_name][$langcode]['actions'] += $element;
-      } else {
+      }
+      else {
 
         // Bail out if permissions are missing.
         if (!user_access('administer properties templates')) {
-           return;
+          return;
         }
-        
+
         list($entity_id, , ) = entity_extract_ids($entity_type, $entity);
         $query = array('entity_type' => $entity_type, 'entity_id' => $entity_id, 'field_name' => $field_name);
 
@@ -224,7 +226,6 @@ function properties_template_field_attach_form($entity_type, $entity, &$form, &$
           '#options' => array('query' => $query),
         );
         $form[$field_name][$langcode]['actions'] += $element;
-
       }
     }
   }
diff --git a/properties_template/properties_template.test b/properties_template/properties_template.test
index 8614b25..1221770 100644
--- a/properties_template/properties_template.test
+++ b/properties_template/properties_template.test
@@ -170,7 +170,7 @@ class PropertiesTemplateTestCase extends PropertiesTemplateBaseTestCase {
     $template = $this->createTemplate(NULL, NULL, $this->categories);
 
     $this->loginTemplateUser();
-    
+
     // Verify that buttons to add attributes and categories don't exist.
     $this->drupalGet('node/add/page');
 
@@ -244,6 +244,5 @@ class PropertiesTemplateTestCase extends PropertiesTemplateBaseTestCase {
     // look if the template was stored in the db
     $template_object = properties_template_load($template_name);
     $this->assertEqual($template_object->label, $template_label);
-
   }
 }
