diff --git a/MULTISITE.txt b/MULTISITE.txt
index 5aed196..bcd8f22 100644
--- a/MULTISITE.txt
+++ b/MULTISITE.txt
@@ -5,7 +5,8 @@ In most single codebase Drupal sites the automatic purging of your content
 should work flawlessly as all the domain names you configured on the "Domains"
 section of your Acquia Cloud subscription are automatically purged. However on
 a multi-site setup this would mean that this module will purge content on other
-sites when your updating content on site A for example, this is unwanted behavior.
+sites when your updating content on site A for example, this is unwanted 
+behavior.
 
 How domain detection works.
 ================================================================================
@@ -47,4 +48,4 @@ $conf['acquia_purge_domains'] = array(
   'www.subsite.mysite.com',
   'subsite.mysite.de',
   'subsite.mysite.nl'
-);
\ No newline at end of file
+);
diff --git a/ROADMAP.txt b/ROADMAP.txt
index c65d5ae..8d0f7fb 100644
--- a/ROADMAP.txt
+++ b/ROADMAP.txt
@@ -6,4 +6,4 @@ Future plans
  * D6 backport if the necessity for that gets high.
  * Become a plugin depending on Purge once Purge 2.X suits our needs and works.
  * Improving domain detection with improvements to Acquia's platform internals.
- * Show graphs on Varnish hit and miss rates.
\ No newline at end of file
+ * Show graphs on Varnish hit and miss rates.
diff --git a/acquia_purge.info b/acquia_purge.info
index 1852437..4eda8ef 100644
--- a/acquia_purge.info
+++ b/acquia_purge.info
@@ -2,4 +2,4 @@ name = Acquia Purge
 description = "Top-notch Varnish purging on Acquia Cloud!"
 package = Acquia Network Connector
 core = 7.x
-dependencies[] = expire
\ No newline at end of file
+dependencies[] = expire
diff --git a/acquia_purge.install b/acquia_purge.install
index 5cbf641..146917e 100644
--- a/acquia_purge.install
+++ b/acquia_purge.install
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * @file acquia_purge.install
+ * @file
  * Installer file for the Acquia Purge module.
  * @author
  * Niels van Mourik - Acquia Client Advisory <niels.vanmourik@acquia.com>
@@ -38,8 +38,11 @@ function acquia_purge_requirements($phase) {
       $domains = $t("Purging of content happens on the following domains:
         <i>@domains</i>. However it seems as if you are running a multi-site
         setup, <a href='!link' target='_blank'>read more here in case the
-        domains are incorrect</a>.", array('@domains' => $domains, '!link' =>
-          'http://drupalcode.org/sandbox/nielsvm/1871170.git/blob_plain/HEAD:/MULTISITE.txt'));
+        domains are incorrect</a>.", array(
+          '@domains' => $domains, 
+          '!link' =>
+          'http://drupalcode.org/sandbox/nielsvm/1871170.git/blob_plain/HEAD:/MULTISITE.txt'
+        ));
     }
 
     // Create the status array.
@@ -84,4 +87,4 @@ function acquia_purge_requirements($phase) {
   }
 
   return $requirements;
-}
\ No newline at end of file
+}
diff --git a/acquia_purge.module b/acquia_purge.module
index ee4ec61..0d521de 100644
--- a/acquia_purge.module
+++ b/acquia_purge.module
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * @file acquia_purge.module
+ * @file
  * Automatically purge pages upon save or the full site from Varnish.
  * @author
  * Niels van Mourik - Acquia Client Advisory <niels.vanmourik@acquia.com>
@@ -12,7 +12,7 @@
  */
 function acquia_purge_permission() {
   return array(
-    'purge notification' =>  array(
+    'purge notification' => array(
       'title' => t('Purge notification'),
       'description' => t('Get a confirmation message on screen for all items that have been purged.'),
     ),
@@ -45,16 +45,16 @@ function acquia_purge_expire_cache($paths) {
 }
 
 /**
- * Implements hook_form_FORM_ID_alter() - system_performance_settings form.
+ * Implements hook_form_FORM_ID_alter().
  */
 function acquia_purge_form_system_performance_settings_alter(&$form, &$form_state, $form_id) {
-
-  /**
-   * Add a checkbox to the performance form to allow users to enable/disable purge reporting.
-   */
+  // Add a checkbox to the performance form to allow users to enable/disable purge reporting.
   $checkbox = array();
   $checkbox['#title'] = t('Report cache purges');
-  $checkbox['#description'] = t('Whenever something in Drupal gets updated that could be remotely cached in Varnish the Acquia Purge module can report this to the screen to notify you. Note that you will need to enable the <i>purge notification</i> permission first.');
+  $checkbox['#description'] = t('Whenever something in Drupal gets updated that 
+    could be remotely cached in Varnish the Acquia Purge module can report this 
+    to the screen to notify you. Note that you will need to enable the 
+    <i>purge notification</i> permission first.');
   $checkbox['#default_value'] = variable_get('acquia_purge_reportpurges', TRUE);
   $checkbox['#type'] = 'checkbox';
   $checkbox['#weight'] = -4;
@@ -79,9 +79,9 @@ function _acquia_purge_are_we_on_acquiacloud() {
   if (is_null($connected)) {
     $assertions = array(
       is_array(variable_get('acquia_hosting_site_info', FALSE)),
-      (bool)_acquia_purge_get_site_name(),
-      (bool)_acquia_purge_get_site_group(),
-      function_exists('curl_init')
+      (bool) _acquia_purge_get_site_name(),
+      (bool) _acquia_purge_get_site_group(),
+      function_exists('curl_init'),
     );
     $connected = !in_array(FALSE, $assertions);
   }
@@ -92,7 +92,7 @@ function _acquia_purge_are_we_on_acquiacloud() {
  * Get a list of defined domains that we can purge for.
  *
  * @returns
- *  Array with string values mapping to all defined DNS domains for this site.
+ *   Array with string values mapping to all defined DNS domains for this site.
  */
 function _acquia_purge_get_domains() {
   static $domains;
@@ -147,12 +147,12 @@ function _acquia_purge_get_domains() {
  * Add a domain to the list of domains after cleaning and checking for duplicates.
  *
  * @param $domain
- *  The domain string to be added to the list.
- * @param &$domains
- *  A reference to the array of currently gathered domain names.
- *
+ *   The domain string to be added to the list.
+ * @param $domains
+ *   A reference to the array of currently gathered domain names.
+ * 
  * @returns
- *  Void, data will be added by reference.
+ *   Void, data will be added by reference.
  */
 function _acquia_purge_get_domains_add($domain, &$domains) {
   $domain = trim(drupal_strtolower($domain));
@@ -164,12 +164,13 @@ function _acquia_purge_get_domains_add($domain, &$domains) {
 /**
  * Expand the list of domains being gathered by those defined in Acquia Cloud.
  *
- * @param &$domains
- *  A reference to the array of currently gathered domain names.
+ * @param $domains
+ *   A reference to the array of currently gathered domain names.
+ * 
  * @returns
- *  Void, data will be added by reference.
+ *   Void, data will be added by reference.
  * @warning
- *  The current implementation of this function is subject to change. @TODO
+ *   The current implementation of this function is subject to change. @TODO
  */
 function _acquia_purge_get_domains_add_acloud(&$domains) {
 
@@ -194,16 +195,17 @@ function _acquia_purge_get_domains_add_acloud(&$domains) {
 /**
  * Expand the list of domains being gathered by interpreting sites/sites.php.
  *
- * @param &$domains
- *  A reference to the array of currently gathered domain names.
+ * @param $domains
+ *   A reference to the array of currently gathered domain names.
+ * 
  * @returns
- *  Void, data will be added by reference.
+ *   Void, data will be added by reference.
  * @warning
- *  The way the sites/sites.php array was designed was to make it a
- *  lookup map with the current active URI as lookup resource, it makes
- *  that relatively easy to do. However, we want to get all domains that
- *  point to the currently chosen site. As the array keys are in the
- *  format of '<port>.<domain>.<path>' this is relatively hackish.
+ *   The way the sites/sites.php array was designed was to make it a
+ *   lookup map with the current active URI as lookup resource, it makes
+ *   that relatively easy to do. However, we want to get all domains that
+ *   point to the currently chosen site. As the array keys are in the
+ *   format of '<port>.<domain>.<path>' this is relatively hackish.
  */
 function _acquia_purge_get_domains_add_sitesphp(&$domains) {
   $sitedir = str_replace('sites/', '', conf_path());
@@ -216,11 +218,11 @@ function _acquia_purge_get_domains_add_sitesphp(&$domains) {
   // Define the full list of TLD's we have to check against to determine if a
   // embedded domain name in '<port>.<domain>.<path>' seems valid for us.
   // @see http://xaviesteve.com/2094/internet-top-level-domains-in-php-javascript-array/
-  include(drupal_get_path('module', 'acquia_purge') . '/acquia_purge.tlds.inc');
+  include_once drupal_get_path('module', 'acquia_purge') . '/acquia_purge.tlds.inc';
 
   // Include the file which will (re)propagate the $sites array for us.
   $sites = array();
-  include('sites/sites.php');
+  include_once 'sites/sites.php';
 
   // Protect ourselves against badly written code inside sites.php.
   if ((!isset($sites)) || empty($sites)) {
@@ -261,7 +263,7 @@ function _acquia_purge_get_domains_add_sitesphp(&$domains) {
  * Determine the Acquia site name.
  *
  * @returns
- *  Either a boolean FALSE or a string identifying what site we are on.
+ *   Either a boolean FALSE or a string identifying what site we are on.
  */
 function _acquia_purge_get_site_name() {
   static $ah_site_name;
@@ -278,7 +280,7 @@ function _acquia_purge_get_site_name() {
  * Determine the Acquia site group.
  *
  * @returns
- *  Either a boolean FALSE or a string identifying what site group this is.
+ *   Either a boolean FALSE or a string identifying what site group this is.
  */
 function _acquia_purge_get_site_group() {
   static $ah_site_group;
@@ -294,14 +296,14 @@ function _acquia_purge_get_site_group() {
 /**
  * Purge the paths from a node from Varnish.
  *
- * @param &$node
- *  A Drupal node object that was just inserted or saved.
+ * @param $node
+ *   A Drupal node object that was just inserted or saved.
  * @param $domains
- *  Array containing all the domain names the record should be purged
- *  from. Optional, default list of domain names will be generated else.
+ *   Array containing all the domain names the record should be purged
+ *   from. Optional, default list of domain names will be generated else.
  *
  * @returns
- *  Boolean TRUE indicating success, boolean FALSE indicating FAILURE.
+ *   Boolean TRUE indicating success, boolean FALSE indicating FAILURE.
  */
 function acquia_purge_purge_node(&$node, $domains = NULL) {
 
@@ -320,14 +322,14 @@ function acquia_purge_purge_node(&$node, $domains = NULL) {
 /**
  * Purge a certain Drupal path from Varnish.
  *
- * @param $path
- *  The Drupal path (e.g. '<front>', 'user/1' or an aliased path).
- * @param $domains
- *  Array containing all the domain names the record should be purged
- *  from. Optional, default list of domain names will be generated else.
+ * @param string $path
+ *   The Drupal path (e.g. '<front>', 'user/1' or an aliased path).
+ * @param mixed $domains
+ *   Array containing all the domain names the record should be purged
+ *   from. Optional, default list of domain names will be generated else.
  *
  * @returns
- *  Boolean TRUE indicating success, boolean FALSE indicating FAILURE.
+ *   Boolean TRUE indicating success, boolean FALSE indicating FAILURE.
  */
 function acquia_purge_purge_path($path, $domains = NULL) {
 
@@ -406,14 +408,14 @@ function acquia_purge_purge_path($path, $domains = NULL) {
 /**
  * Purge a several Drupal paths from Varnish.
  *
- * @param $paths
- *  Array with Drupal paths (e.g. '<front>', 'user/1' or an aliased path).
- * @param $domains
- *  Array containing all the domain names the record should be purged
- *  from. Optional, default list of domain names will be generated else.
+ * @param mixed $paths
+ *   Array with Drupal paths (e.g. '<front>', 'user/1' or an aliased path).
+ * @param mixed $domains
+ *   Array containing all the domain names the record should be purged
+ *   from. Optional, default list of domain names will be generated else.
  *
  * @returns
- *  Boolean TRUE indicating success, boolean FALSE indicating FAILURE.
+ *   Boolean TRUE indicating success, boolean FALSE indicating FAILURE.
  */
 function acquia_purge_purge_paths($paths, $domains = NULL) {
   $results = array();
diff --git a/acquia_purge.rules.inc b/acquia_purge.rules.inc
index 33b6c29..e44849b 100644
--- a/acquia_purge.rules.inc
+++ b/acquia_purge.rules.inc
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * @file acquia_purge.rules.inc
+ * @file
  * Integrate with the rules project by providing a purge action.
  * @author
  * Niels van Mourik - Acquia Client Advisory <niels.vanmourik@acquia.com>
@@ -19,7 +19,10 @@ function acquia_purge_rules_action_info() {
         'path' => array(
           'type' => 'text',
           'label' => t('Path'),
-          'description' => t('The Drupal path that needs to be purged as relative from the document root of the site. When provided multiple lines, multiple paths will be purged at once. Examples are "node/1" and "news" and there is no need to add a slash at the beginning or end.')
+          'description' => t('The Drupal path that needs to be purged as 
+            relative from the document root of the site. When provided multiple 
+            lines, multiple paths will be purged at once. Examples are "node/1" 
+            and "news" and there is no need to add a slash at the beginning or end.'),
         ),
       )
     ),
@@ -31,8 +34,7 @@ function acquia_purge_rules_action_info() {
  */
 function _acquia_purge_action_purge($configured_paths) {
   $paths = array();
-
-
+  
   // As users can enter these paths, we are treating them as tainted input.
   foreach (explode("\n", $configured_paths) as $configured_path) {
     $path = array();
@@ -44,11 +46,15 @@ function _acquia_purge_action_purge($configured_paths) {
         $path[] = $path_indice;
       }
     }
-
+    
+    if (strpos($path, '/' !== FALSE)) {
+      $path = substr($path, 1);
+    }
+    
     // Reassemble the path and add it to the paths collection.
     $paths[] = implode('/', $path);
   }
 
   // Relay the purging of these paths to our API helper and we are done here.
   acquia_purge_purge_paths($paths);
-}
\ No newline at end of file
+}
