diff --git a/.project b/.project
deleted file mode 100644
index da556d1..0000000
--- a/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>one_comment_only</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.php.core.PhpIncrementalProjectBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.php.core.ValidationManagerWrapper</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.php.core.PHPNature</nature>
-	</natures>
-</projectDescription>
diff --git a/one_comment_only.admin.inc b/one_comment_only.admin.inc
index 401551d..6571b32 100644
--- a/one_comment_only.admin.inc
+++ b/one_comment_only.admin.inc
@@ -12,60 +12,60 @@
 function one_comment_only_settings() {
 
   $form['one_comment_only_info'] = array(
-    '#value' => t('<p>Limits the number of comments that a user can post on a node.</p>')
-    );
-	
-    
+    '#value' => t('<p>Limits the number of comments that a user can post on a node.</p>'),
+  );
+
+
   // General settings.
   $form['general'] = array(
     '#type' => 'fieldset',
     '#title' => t('General settings'),
     '#collapsible' => TRUE,
     '#collapsed' => FALSE,
-    ); 
-	
+  );
+
   $form['general']['one_comment_only_max'] = array(
     '#type' => 'textfield',
     '#title' => t('Maximum number of comments'),
     '#default_value' => variable_get('one_comment_only_max', 1),
     '#description' => t('What is the maximum number of comments?'),
-    );
-    
+  );
+
   $form['general']['one_comment_only_by_user'] = array(
     '#type' => 'checkbox',
     '#title' => t('Limit by user'),
     '#default_value' => variable_get('one_comment_only_by_user', false),
     '#description' => t('Do we limit the number of comments for each user (checked) or is this an overall limit (unchecked)?'),
-    );
-    
+  );
+
   $form['general']['one_comment_only_max_age'] = array(
     '#type' => 'textfield',
     '#title' => t('Time limit allowed for comments'),
     '#default_value' => variable_get('one_comment_only_max_age', ""),
     '#description' => t('Leave blank for indefinite time, enter date and time in format: <em>dd-mm-yyyy hh:mm:ss</em> or use relative time i.e. +1 day, +2 months, +1 year, +3 years'),
-    );
+  );
   $form['general']['one_comment_only_relative'] = array(
     '#type' => 'checkbox',
     '#title' => t('Is the time limit relative?'),
     '#default_value' => variable_get('one_comment_only_relative', false),
     '#description' => t('Check if the time limit is relative to the publish date, i.e. +1 day, etc'),
-    );
+  );
+
 
-                 
   // Types settings.
   $form['types'] = array(
     '#type' => 'fieldset',
     '#title' => t('Types'),
-  	'#collapsible' => TRUE,
+    '#collapsible' => TRUE,
     '#collapsed' => FALSE,
-    );    
-    
+  );
+
   $select = array();
   $types = node_get_types();
   $names = node_get_types('names');
   foreach ($types as $key => $type) {
     $select[$key] = $names[$key];
-  } 
+  }
   $form['types']['one_comment_only_types'] = array(
     '#title' => t('Limited Types'),
     '#type' => 'checkboxes',
@@ -74,18 +74,19 @@ function one_comment_only_settings() {
     '#description' => t('Select here which node types which you want to limit number of comments for.'),
     '#prefix' => '<div class="one_comment_only_checkboxes">',
     '#suffix' => '</div>',
-    );  
-    
+  );
+
   return system_settings_form($form);
 }
 
 /**
-* Form validation function, we check if the limit format is ok
-*/
+ * Form validation function, we check if the limit format is ok
+ */
 function one_comment_only_settings_validate($form, &$form_state) {
   if (!is_numeric($form_state['values']['one_comment_only_max'])) {
     form_set_error('', t('You must enter an integer value for the limit.'));
-  }else if ($form_state['values']['one_comment_only_max']<0) {
+  }
+  else if ($form_state['values']['one_comment_only_max'] < 0) {
     form_set_error('', t('You must enter an positive value for the limit.'));
   }
-}
\ No newline at end of file
+}
diff --git a/one_comment_only.module b/one_comment_only.module
index 47ff188..f191679 100644
--- a/one_comment_only.module
+++ b/one_comment_only.module
@@ -18,15 +18,15 @@ define('ONE_COMMENT_ONLY_ADMIN_UID', 1);
  * @return help text for the path
  */
 function one_comment_only_help($path, $arg) {
-	$output = '';  //declare your output variable
-	
-	switch ($path) {
-		case "admin/help#one_comment_only":
-			$output = '<p>'.  t("Limits the number of comments that a user can post on a node.") .'</p>';
-		break;
-	}
-	
-	return $output;
+  $output = ''; //declare your output variable
+
+  switch ($path) {
+    case "admin/help#one_comment_only":
+      $output = '<p>' . t("Limits the number of comments that a user can post on a node.") . '</p>';
+      break;
+  }
+
+  return $output;
 } // function one_comment_only_help
 
 /**
@@ -34,7 +34,7 @@ function one_comment_only_help($path, $arg) {
  * @return array An array of valid permissions for the onthisdate module
  */
 function one_comment_only_perm() {
-	return array('administer one_comment_only');
+  return array('administer one_comment_only');
 } // function one_comment_only_perm()
 
 /**
@@ -49,7 +49,7 @@ function one_comment_only_menu() {
     'access arguments' => array('administer one_comment_only'),
     'file' => 'one_comment_only.admin.inc',
   );
-  
+
   return $menu;
 }
 
@@ -60,55 +60,64 @@ function one_comment_only_menu() {
  * @param $error output error message
  *  * @return true if the user gets the right to publish
  */
-function _one_comment_only_violates_limit($parent,$user,&$error){
-	$ret=false;
-
-	// we get settings
-	$limitedTypes = variable_get('one_comment_only_types', array());
-	$limit=variable_get("one_comment_only_max",1);
-	$by_user=variable_get("one_comment_only_by_user",true);
-	$max_age=variable_get("one_comment_only_max_age","");
-	$relative=variable_get("one_comment_only_relative",false);
-	
-	
-	
-	// we check that the node type is under control and that the user is not the administrator
-	// TODO : add a bypass for selected roles
-	if ( $user->uid!=ONE_COMMENT_ONLY_ADMIN_UID && $limitedTypes[$parent->type]!="0" ){
-	
-		// we get number of user's nodes from the same type
-		if ($by_user) $where="(nc.nid= %d AND nc.uid = %d)";
-		else $where="nc.nid= %d";
-	    $sql_count = 'SELECT COUNT(DISTINCT(nc.cid)) as c FROM {node_comments} nc WHERE '.$where;
-	    $sql_count = db_rewrite_sql($sql_count);
-	    $result =  db_query($sql_count, $parent->nid, $user->uid);
-	    $count=db_fetch_object($result);
-	    
-	    // we get the max age of comments
-	    if (strtotime($max_age)){
-	    	if ($relative){
-			    $publish_date=$parent->created;
-			    $max_time=strtotime($max_age)-time();
-			    $max_time=time()-($publish_date+$max_time);
-	    	}else{
-	    		$max_time=time()-strtotime($max_age);
-	    	}
-		    if ($max_time>0){
-				$error=t("You can't create comment for this !type anymore, time limit is exhausted", array('!type' => $parent->type));
-			    $ret=true;
-		    }
-	    }
-	   
-	    // we check the limit
-	    if ($count->c>$limit){
-			if ($by_user) $error=t("You can't create more than !limit comment(s) for this !type",array('!limit' => $limit,'!type' => $parent->type));
-			else $error=t("The overall limit of !limit comment(s) has been reached, you can't comment anymore this !type.", array('!limit' => $limit,'!type' => $parent->type));
-	    	$ret=true;
-	    }
-	    
-	}
-	return $ret;
-	
+function _one_comment_only_violates_limit($parent, $user, &$error) {
+  $ret = false;
+
+  // we get settings
+  $limitedTypes = variable_get('one_comment_only_types', array());
+  $limit = variable_get("one_comment_only_max", 1);
+  $by_user = variable_get("one_comment_only_by_user", true);
+  $max_age = variable_get("one_comment_only_max_age", "");
+  $relative = variable_get("one_comment_only_relative", false);
+
+
+
+  // we check that the node type is under control and that the user is not the administrator
+  // TODO : add a bypass for selected roles
+  if ( $user->uid != ONE_COMMENT_ONLY_ADMIN_UID && $limitedTypes[$parent->type] != "0" ) {
+
+    // we get number of user's nodes from the same type
+    if ($by_user) {
+      $where = "(nc.nid= %d AND nc.uid = %d)";
+    }
+    else {
+      $where = "nc.nid= %d";
+    }
+    $sql_count = 'SELECT COUNT(DISTINCT(nc.cid)) as c FROM {node_comments} nc WHERE ' . $where;
+    $sql_count = db_rewrite_sql($sql_count);
+    $result =  db_query($sql_count, $parent->nid, $user->uid);
+    $count = db_fetch_object($result);
+
+    // we get the max age of comments
+    if (strtotime($max_age)) {
+      if ($relative) {
+        $publish_date = $parent->created;
+        $max_time = strtotime($max_age) -time();
+        $max_time = time() -($publish_date + $max_time);
+      }
+      else {
+        $max_time = time() -strtotime($max_age);
+      }
+      if ($max_time > 0) {
+        $error = t("You can't create comment for this !type anymore, time limit is exhausted", array('!type' => $parent->type));
+        $ret = true;
+      }
+    }
+
+    // we check the limit
+    if ($count->c > $limit) {
+      if ($by_user) {
+        $error = t("You can't create more than !limit comment(s) for this !type", array('!limit' => $limit, '!type' => $parent->type));
+      }
+      else {
+        $error = t("The overall limit of !limit comment(s) has been reached, you can't comment anymore this !type.", array('!limit' => $limit, '!type' => $parent->type));
+      }
+      $ret = true;
+    }
+
+  }
+  return $ret;
+
 }
 
 /**
@@ -119,23 +128,23 @@ function _one_comment_only_violates_limit($parent,$user,&$error){
  * is constructed.
  */
 function one_comment_only_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
-	global $user;
-		
-	// we want to control only comment, nodes limits are provided by node_limit otherwise
-	if ($node->comment_target_cid==0 && $op == 'presave') {
-		// we get the parent node
-		$pid=$node->comment_target_nid;
-		
-		$parent=node_load($pid);
-		// we prepare error message
-		$error="";
-		
-		// we check the limit and the node pre-existence
-	  	if ( !isset($node->nid) && _one_comment_only_violates_limit($parent,$user,$error) ) {
-		    // we have a violation and this is a new node
-			drupal_set_message($error, 'error');
-			// we return to the node page
-		    drupal_goto('node/'.arg(3));
-	  	}
-	}
+  global $user;
+
+  // we want to control only comment, nodes limits are provided by node_limit otherwise
+  if ($node->comment_target_cid == 0 && $op == 'presave') {
+    // we get the parent node
+    $pid = $node->comment_target_nid;
+
+    $parent = node_load($pid);
+    // we prepare error message
+    $error = "";
+
+    // we check the limit and the node pre-existence
+    if ( !isset($node->nid) && _one_comment_only_violates_limit($parent, $user, $error) ) {
+      // we have a violation and this is a new node
+      drupal_set_message($error, 'error');
+      // we return to the node page
+      drupal_goto('node/' . arg(3));
+    }
+  }
 }

