diff --git phone.au.inc phone.au.inc
deleted file mode 100644
index 9535a01..0000000
--- phone.au.inc
+++ /dev/null
@@ -1,284 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Australian phone numbers.
- */
-
- function phone_au_metadata() {
-   return array(
-     'label' => 'Phone Numbers - Australia',
-     'error' => '"%value" is not a valid Australian phone number<br>Australian phone numbers should contain only numbers with an optional prefix of "+61"',
-   );
- }
-
-/**
- * Verification for Australian Phone Numbers.
- * According to http://www.itu.int/itudoc/itu-t/number/a/aus/70772.html
- *    (Released 2005/10/03, retrieved 2008/04/14)
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_au_phone_number($phonenumber) {
-
-  //$phonenumber = trim($phonenumber);
-
-  // strip formatting chars
-  $phonenumber = preg_replace('/[\-() ]/', '', $phonenumber);
-  // strip optional '+61' or '0' prefixes
-  $phonenumber = preg_replace('/^(\+61|0)/', '', $phonenumber);
-
-  //$rules[] = array("Prefix","Minimum length","Maximum length");
-  $rules[] = array("10", 5, 15);
-  $rules[] = array("12", 5, 15);
-  $rules[] = array("13", 6, 10);
-  $rules[] = array("1451", 9, 9);
-  $rules[] = array("1452", 9, 9);
-  $rules[] = array("1453", 9, 9);
-  $rules[] = array("1471", 9, 9);
-  $rules[] = array("16", 5, 9);
-  $rules[] = array("1800", 10, 10);
-  $rules[] = array("1801", 8, 8);
-  $rules[] = array("1900", 10, 10);
-  $rules[] = array("1901", 10, 10);
-  $rules[] = array("1902", 10, 10);
-  $rules[] = array("1906", 10, 10);
-  $rules[] = array("1983", 9, 9);
-  $rules[] = array("2001", 4, 4);
-  $rules[] = array("2002", 4, 4);
-  $rules[] = array("2003", 4, 4);
-  //$rules[] = array("2", 9, 9); // More specific rules follow
-  $rules[] = array("240", 9, 9);
-  $rules[] = array("242", 9, 9);
-  $rules[] = array("243", 9, 9);
-  $rules[] = array("244", 9, 9);
-  $rules[] = array("245", 9, 9);
-  $rules[] = array("246", 9, 9);
-  $rules[] = array("247", 9, 9);
-  $rules[] = array("248", 9, 9);
-  $rules[] = array("249", 9, 9);
-  $rules[] = array("260", 9, 9);
-  $rules[] = array("261", 9, 9);
-  $rules[] = array("262", 9, 9);
-  $rules[] = array("263", 9, 9);
-  $rules[] = array("264", 9, 9);
-  $rules[] = array("265", 9, 9);
-  $rules[] = array("266", 9, 9);
-  $rules[] = array("267", 9, 9);
-  $rules[] = array("268", 9, 9);
-  $rules[] = array("269", 9, 9);
-  $rules[] = array("28", 9, 9);
-  $rules[] = array("29", 9, 9);
-  //$rules[] = array("3", 9, 9); // More specific rules follow
-  $rules[] = array("350", 9, 9);
-  $rules[] = array("351", 9, 9);
-  $rules[] = array("352", 9, 9);
-  $rules[] = array("353", 9, 9);
-  $rules[] = array("354", 9, 9);
-  $rules[] = array("355", 9, 9);
-  $rules[] = array("356", 9, 9);
-  $rules[] = array("357", 9, 9);
-  $rules[] = array("358", 9, 9);
-  $rules[] = array("359", 9, 9);
-  $rules[] = array("362", 9, 9);
-  $rules[] = array("363", 9, 9);
-  $rules[] = array("364", 9, 9);
-  $rules[] = array("38", 9, 9);
-  $rules[] = array("39", 9, 9);
-// begin mobile phone numbers     
-  $rules[] = array("400", 9, 9);
-  $rules[] = array("401", 9, 9);
-  $rules[] = array("402", 9, 9);
-  $rules[] = array("403", 9, 9);
-  $rules[] = array("404", 9, 9);
-  $rules[] = array("405", 9, 9);
-  $rules[] = array("406", 9, 9);
-  $rules[] = array("407", 9, 9);
-  $rules[] = array("408", 9, 9);
-  $rules[] = array("409", 9, 9);
-  $rules[] = array("410", 9, 9);
-  $rules[] = array("411", 9, 9);
-  $rules[] = array("412", 9, 9);
-  $rules[] = array("413", 9, 9);
-  $rules[] = array("414", 9, 9);
-  $rules[] = array("415", 9, 9);
-  $rules[] = array("416", 9, 9);
-  $rules[] = array("417", 9, 9);
-  $rules[] = array("418", 9, 9);
-  $rules[] = array("419", 9, 9);
-  $rules[] = array("420", 9, 9);
-  $rules[] = array("4200", 9, 9);
-  $rules[] = array("42010", 9, 9);
-  $rules[] = array("421", 9, 9);
-  $rules[] = array("422", 9, 9);
-  $rules[] = array("423", 9, 9);
-  $rules[] = array("424", 9, 9);
-  $rules[] = array("425", 9, 9);
-  $rules[] = array("4251", 9, 9);
-  $rules[] = array("4252", 9, 9);
-  $rules[] = array("4253", 9, 9);
-  $rules[] = array("4256", 9, 9);
-  $rules[] = array("4257", 9, 9);
-  $rules[] = array("4258", 9, 9);
-  $rules[] = array("427", 9, 9);
-  $rules[] = array("428", 9, 9);
-  $rules[] = array("429", 9, 9);
-  $rules[] = array("430", 9, 9);
-  $rules[] = array("4300", 9, 9);
-  $rules[] = array("4301", 9, 9);
-  $rules[] = array("4302", 9, 9);
-  $rules[] = array("4303", 9, 9);
-  $rules[] = array("4304", 9, 9);
-  $rules[] = array("4305", 9, 9);
-  $rules[] = array("431", 9, 9);
-  $rules[] = array("432", 9, 9);
-  $rules[] = array("433", 9, 9);
-  $rules[] = array("434", 9, 9);
-  $rules[] = array("435 ", 9, 9);
-  $rules[] = array("4350", 9, 9);
-  $rules[] = array("437", 9, 9);
-  $rules[] = array("438", 9, 9);
-  $rules[] = array("439", 9, 9);
-  $rules[] = array("447", 9, 9);
-  $rules[] = array("448", 9, 9);
-  $rules[] = array("449", 9, 9);
-  $rules[] = array("449", 9, 9);  
-  $rules[] = array("450 ", 9, 9);
-  $rules[] = array("451", 9, 9);
-  $rules[] = array("457", 9, 9);
-  $rules[] = array("458", 9, 9);
-  $rules[] = array("4590", 9, 9);
-  $rules[] = array("4591", 9, 9);
-  $rules[] = array("4592", 9, 9);
-  $rules[] = array("466", 9, 9);
-  $rules[] = array("488", 9, 9);
-// end mobile phone numbers   
-  $rules[] = array("50", 9, 9);
-  $rules[] = array("51", 9, 9);
-  $rules[] = array("52", 9, 9);
-  $rules[] = array("53", 9, 9);
-  $rules[] = array("54", 9, 9);
-  $rules[] = array("55", 9, 9);
-  $rules[] = array("56", 9, 9);
-  $rules[] = array("57", 9, 9);
-  $rules[] = array("58", 9, 9);
-  //$rules[] = array("59", 9, 9); //Not for use after 31 December 2005
-  //$rules[] = array("7", 9, 9); // More specific rules follow
-  $rules[] = array("73", 9, 9);
-  $rules[] = array("740", 9, 9);
-  $rules[] = array("741", 9, 9);
-  $rules[] = array("745", 9, 9);
-  $rules[] = array("746", 9, 9);
-  $rules[] = array("747", 9, 9);
-  $rules[] = array("749", 9, 9);
-  $rules[] = array("754", 9, 9);
-  $rules[] = array("755", 9, 9);
-  $rules[] = array("756", 9, 9);
-  //$rules[] = array("8", 9, 9); // More specific rules follow
-  $rules[] = array("86", 9, 9);
-  $rules[] = array("871", 9, 9);
-  $rules[] = array("872", 9, 9);
-  $rules[] = array("873", 9, 9);
-  $rules[] = array("874", 9, 9);
-  $rules[] = array("880", 9, 9);
-  $rules[] = array("881", 9, 9);
-  $rules[] = array("882", 9, 9);
-  $rules[] = array("883", 9, 9);
-  $rules[] = array("884", 9, 9);
-  $rules[] = array("885", 9, 9);
-  $rules[] = array("886", 9, 9);
-  $rules[] = array("887", 9, 9);
-  $rules[] = array("888", 9, 9);
-  $rules[] = array("889", 9, 9);
-  $rules[] = array("890", 9, 9);
-  $rules[] = array("891", 9, 9);
-  $rules[] = array("892", 9, 9);
-  $rules[] = array("893", 9, 9);
-  $rules[] = array("894", 9, 9);
-  $rules[] = array("895", 9, 9);
-  $rules[] = array("896", 9, 9);
-  $rules[] = array("897", 9, 9);
-  $rules[] = array("898", 9, 9);
-  $rules[] = array("899", 9, 9);
-
-  foreach ($rules as $rule) {
-    if (preg_match('/^'.$rule[0].'/', $phonenumber) && strlen($phonenumber) >= $rule[1] && strlen($phonenumber) <= $rule[2]) {
-      return TRUE;
-    }
-  }
-  return FALSE;
-}
-
-/**
- * Formatting for Australian Phone Numbers. Based upon ITU-T E.123 (but let's not get too crazy)
- *
- * @param string $phonenumber
- * @return string Returns a string containing the phone number with some formatting.
- */
-function format_au_phone_number($phonenumber, $field = FALSE) {
-  $prefix = '';
-  $extension = '';
-  // strip old formatting chars
-  $phonenumber = preg_replace('/[\-() ]/', '', $phonenumber);
-
-  /*
-   * strip and save the +61 prefix if found
-   */
-  if (preg_match('/^\+61/', $phonenumber, $match)) {
-    $prefix = '+61 ';
-    $phonenumber = str_replace('+61', '', $phonenumber);
-  }
-
-  /*
-   * strip and save the extension (x9999) postfix if found
-   */
-  if (preg_match('/(x[0-9]+)$/', $phonenumber, $match)) {
-    $extension = ' ('.$match[1].')';
-    $phonenumber = preg_replace('/x[0-9]+$/', '', $phonenumber);
-  }
-
-  /*
-   * geographic numbers and UPT
-   * Eg. (02) 9999 9999 or +61 (2) 9999 9999
-   */
-  if (preg_match('/^(0{0,1}[23578])([0-9]{4})([0-9]{4})$/', $phonenumber, $match)) {
-    return $prefix . '(' . $match[1] . ') ' . $match[2] . ' ' . $match[3] . $extension;
-  }
-
-  /*
-   * mobile numbers
-   * Eg. 0423 999 999 or +61 423 999 999
-   */
-  if (preg_match('/^(0{0,1}4[0-9]{2})([0-9]{3})([0-9]{3})$/', $phonenumber, $match)) {
-    return $prefix . $match[1] . ' ' . $match[2] . ' ' . $match[3] . $extension;
-  }
-
-  /*
-   * 10 digit numbers
-   * Eg. 1800 999 999
-   */
-  if (preg_match('/^([0-9]{4})([0-9]{3})([0-9]{3})$/', $phonenumber, $match)) {
-    return $prefix . $match[1] . ' ' . $match[2] . ' ' . $match[3] . $extension;
-  }
-
-  /*
-   * 9 digit satellite or dialup data numbers
-   * Eg. 1471 99999
-   */
-  if (preg_match('/^(14[0-9]{2}|1983)([0-9]{5})$/', $phonenumber, $match)) {
-    return $prefix . $match[1] . ' ' . $match[2] . $extension;
-  }
-
-  /*
-   * 6 digit numbers
-   * Eg. 13 99 99
-   */
-  if (preg_match('/^([0-9]{2})([0-9]{2})([0-9]{2})$/', $phonenumber, $match)) {
-    return $prefix . $match[1] . ' ' . $match[2] . ' ' . $match[3] . $extension;
-  }
-
-  // default
-  return $prefix . $phonenumber . $extension;
-}
-
diff --git phone.be.inc phone.be.inc
deleted file mode 100644
index 8e8f9eb..0000000
--- phone.be.inc
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Belgian phone numbers.
- */
-
-function phone_be_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Belgium',
-    'error' => '"%value" is not a valid Belgian phone number<br>Belgian phone numbers should only ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is valid
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_be_phone_number($phonenumber) {
-  // define regular expression
-  $regex = "/^(\+32|0)[1-9]\d{7,8}$/i";
-
-
-  $phonenumber  = str_replace(array(' ','-','(',')'), '', $phonenumber);
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Belgian Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_be_phone_number($phonenumber, $field) {
-
-  $phonenumber = trim($phonenumber);
-
-   if ($field['phone_country_code']) {
-      if ($matches[1] != "+32") {
-  	$phonenumber = "+32" . " " . $phonenumber;
-      }
-   }
-   
-   return $phonenumber;
-}
diff --git phone.br.inc phone.br.inc
deleted file mode 100644
index 88184d6..0000000
--- phone.br.inc
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Brazilian phone numbers.
- * (based on CCK Field for French phone numbers.)
- */
-define('PHONE_BR_REGEX', "/^(\+|0{2}|)?(55|0|)[ -.]?((\(0?[1-9][0-9]\))|(0?[1-9][0-9]))[ -.]?([1-9][0-9]{2,3})[ -.]?([0-9]{4})$/");
-
-function phone_br_metadata() {
-  return array(
-    'label' => ' Phone Numbers - Brazil',
-    'error' => '"%value" is not a valid Brazilian phone number<br>Brazilian phone numbers should contain only numbers and spaces and - and be like 099 9999-9999 or 99 9999-9999 with an optional prefix of "+55".',
-  );
-}
-
-/**
- * Verification for Brazilian Phone Numbers.
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_br_phone_number($phonenumber) {
-
-  $phonenumber = trim($phonenumber);
-/*
-  $phonenumber  = str_replace(array(' ','-','(',')'), '', $phonenumber);
-*/
-  return (bool) preg_match(PHONE_BR_REGEX, $phonenumber);
-}
-
-/**
- * Formatting for Brazilian Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_br_phone_number($phonenumber, $field = FALSE) {
-  $phone  = str_replace(array(' ','-','(',')'), '', $phonenumber);
-  if (preg_match(PHONE_BR_REGEX, $phone, $matches) != 1) {
-    return $phonenumber; // this is possible?
-  }
-  $formatedphone = '';
-  if ($field && $field['phone_country_code']) {
-    $formatedphone .= '+55 ';
-  }
-  $formatedphone .= '(' . $matches[3] . ')';
-  $formatedphone .= ' ' . $matches[6] . '-';
-  $formatedphone .= '' . $matches[7];
-
-  return $formatedphone;
-}
diff --git phone.ca.inc phone.ca.inc
deleted file mode 100644
index 3437148..0000000
--- phone.ca.inc
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Canadian phone numbers.
- */
-
-function phone_ca_metadata() {
-  return array(
-    'label' => 'Phone Numbers - US & Canada',
-    'error' => '"%value" is not a valid North American phone number<br>North American Phone numbers should only contain numbers and + and - and ( and ) and spaces and be like 999-999-9999. Please enter a valid ten-digit phone number with optional extension.',
-  );
-}
-
-/**
- * Verifies that $phonenumber is a valid ten-digit North American phone number
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-
-function valid_ca_phone_number($phonenumber) {
-
-  $phonenumber = trim($phonenumber);
-
-  // define regular expression
-  $regex = '/
-    \D*           # ignore non-digits
-    (\d*)         # an optional 1
-    \D*           # optional separator
-    [2-9][0-8]\d  # area code (Allowed range of [2-9] for the first digit, [0-8] for the second, and [0-9] for the third digit)
-    \D*           # optional separator
-    [2-9]\d{2}    # 3-digit prefix (cannot start with 0 or 1)
-    \D*           # optional separator
-    \d{4}         # 4-digit line number
-    \D*           # optional separator
-    \d*           # optional extension
-    \D*           # ignore trailing non-digits
-    /x';
-  // return true if valid, false otherwise
-  $result = preg_match($regex, $phonenumber, $matches);
-  return ($result && ($matches[1] == '' || $matches[1] == '1'));
-}
-
-/**
- * Convert a valid North American phone number into standard (444) 867-5309 x1234 format
- *
- * @param $phonenumber must be a valid ten-digit number (with optional extension)
- *
- */
-function format_ca_phone_number($phonenumber, $field) {
-
-  // define regular expression
-  $regex = '/
-    \D*            # ignore non-digits
-    (\d*)          # an optional 1
-    \D*            # optional separator
-    ([2-9][0-8]\d) # area code (Allowed range of [2-9] for the first digit, [0-8] for the second, and [0-9] for the third digit)
-    \D*            # optional separator
-    ([2-9]\d{2})   # 3-digit prefix (cannot start with 0 or 1)
-    \D*            # optional separator
-    (\d{4})        # 4-digit line number
-    \D*            # optional separator
-    (\d*)          # optional extension
-    \D*            # ignore trailing non-digits
-    /x';
-
-  // get digits of phone number
-  preg_match($regex, $phonenumber, $matches);
-
-  $separator = isset($field['ca_phone_separator']) ? $field['ca_phone_separator'] : '-';
-
-  // construct ten-digit phone number
-  $phonenumber =
-    ( $field['ca_phone_parentheses'] ?
-      '(' . $matches[2] . ') ' :
-      $matches[2] . $separator ) .
-      $matches[3] . $separator . $matches[4];
-
-  // Optional extension
-  if ($matches[5] != '') {
-      $phonenumber .= ' x' . $matches[5];
-  }
-
-  if ($field['phone_country_code']) {
-    // This condition check is pointless.  
-    if ($matches[1] != '1') {
-  	$phonenumber = '1' . ' ' . $phonenumber;
-    }
-  }
-  return $phonenumber;
-}
diff --git phone.ch.inc phone.ch.inc
deleted file mode 100644
index 8622ec0..0000000
--- phone.ch.inc
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Switzerland phone numbers.
- */
-
-define('PHONE_CH_REGEX', "%(\+41|0|0041)([2-9]\d{8})$%");
-
-function phone_ch_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Switzerland',
-    'error' => '"%value" is not a valid Swiss phone number<br>Swiss phone numbers should only contain numbers and spaces and be like 099 999 99 99',
-  );
-}
-
-/**
- * Verification for private/standr switzerland Phone Numbers (E.164/2002).
- * According to http://en.wikipedia.org/wiki/Telephone_numbers_in_Switzerland#After_2002
- *    (Released 2002)
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_ch_phone_number($phonenumber) {
-  $phonenumber = str_replace(array(' ','-','.','/','(',')'), '', $phonenumber);
-  $match =array();
-  $result = (bool) preg_match(PHONE_CH_REGEX, $phonenumber, $match);
-  return $result;
-}
-
-/**
- * Formatting for Switzerland Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_ch_phone_number($phonenumber, $field = FALSE) {
-  $phone  = str_replace(array(' ','-','.','/','(',')'), '', $phonenumber);
-  $matches =array();
-  if (preg_match(PHONE_CH_REGEX, $phone, $matches) != 1) {
-    return $phonenumber; // not a switzerland phone number
-  }
-
-  $value =($field && $field['phone_country_code'] ? '+41 (0)' : '0') .
-  					substr($matches[2],0,2).
-  				  ' '.substr($matches[2],2,3).
-  					' '.substr($matches[2],5,2).
-  					' '.substr($matches[2],7);
-  return $value;
-}
diff --git phone.cl.inc phone.cl.inc
deleted file mode 100644
index c54dfd6..0000000
--- phone.cl.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Chili phone numbers.
- */
-
-function phone_cl_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Chili',
-    'error' => '"%value" is not a valid Chilean mobile phone number<br>Chili phone numbers should only ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is valid
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_cl_phone_number($phonenumber) {
-  // define regular expression
-  $regex = "/^((\(\d{3}\) ?)|(\d{3}-)|(\(\d{2}\) ?)|(\d{2}-)|(\(\d{1}\) ?)|(\d{1}-))?\d{3}-(\d{3}|\d{4})$/i";
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Chili Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_cl_phone_number($phonenumber, $field) {
-
-  //$phonenumber = trim($phonenumber);
-
-   // do some formatting on the phone number
-
-/* ==> to be done ==> add the country code 
-   if ($field['phone_country_code']) {
-      if ($matches[1] != "+39") {
-  	$phonenumber = "+39" . " " . $phonenumber;
-      }
-   }
-*/ 
-   return $phonenumber;
-}
diff --git phone.cn.inc phone.cn.inc
deleted file mode 100644
index 60ef550..0000000
--- phone.cn.inc
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for China phone numbers.
- */
-
-function phone_cn_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - China',
-    'error' => '"%value" is not a valid Chinese phone number!<br>Chinese phone numbers should ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is a valid Chinese phone number
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_cn_phone_number($phonenumber) {
-
-  $phonenumber = trim($phonenumber);
-
-  // define regular expression
-  $regex = '/^(\+86|86)?( |-)?([0-9]{11}|([0-9]{3,4}(\-|\.| )[0-9]{3,8})|[0-9]{2}( |\-)[0-9]{4}[ ][0-9]{4}|[0-9]{2}\.[0-9]{2}\.[0-9]{2}\.[0-9]{2}\.[0-9]{2})$/';
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Convert a valid Chinese phone number into standard ... format
- *
- * @param $phonenumber must be a valid number (with optional international prefix)
- *
- */
-function format_cn_phone_number($phonenumber, $field) {
-
-  return $phonenumber;
-}
diff --git phone.cr.inc phone.cr.inc
deleted file mode 100644
index 6027a4e..0000000
--- phone.cr.inc
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Costa Rican phone numbers.
- */
-
- function phone_cr_metadata() {
-   // These strings are translated using t() on output.
-   return array(
-     'label' => 'Phone Numbers - Costa Rica',
-     'error' => '"%value" is not a valid Costa Rican phone number!<br>Costa Rican phone numbers should contain only numbers and spaces be like 99 99 99 99 with an optional prefix of "+506" or "00506".',
-   );
- }
-
-/**
- * Verifies that $phonenumber is a valid eight-digit Costa Rican phone number
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_cr_phone_number($phonenumber) {
-
-  //$phonenumber = trim($phonenumber);
-
-  // define regular expression
-    $regex = "/(00)?[\s|-]?((\+)?[\s|-]?[0-9]{3})?[\s|-]?([0-9]{2})[\s|-]?([0-9]{2})[\s|-]?([0-9]{2})[\s|-]?([0-9]{2})[\s|-]?/";
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Convert a valid Costa Rican phone number into standard (+506) 5555 55 55 format
- *
- * @param $phonenumber must be a valid eight-digit number (with optional international prefix)
- *
- */
-
-  /*
-    Accepts:
-        +506 88798857
- 		+506 88-79-88-57
-        00506 88798857
-        00506 88-79-88-57
-    Rejects:
-        +506 8 8798857
- 		+506 8 8-79-88-57
-        00506 8 8798857
-        00506 8 8-79-88-57  */
-
-function format_cr_phone_number($phonenumber, $field = FALSE) {
-
-  // define regular expression
-    $regex = "/(00)?[\s|-]?((\+)?[\s|-]?[0-9]{3})?[\s|-]?([0-9]{2})[\s|-]?([0-9]{2})[\s|-]?([0-9]{2})[\s|-]?([0-9]{2})[\s|-]?/";
-
-  // get digits of phone number
-  //dprint_r($matches);
-  preg_match($regex, $phonenumber, $matches);
-
-  // construct eight-digit phone number
-
-  //dprint_r($matches);
-  $phonenumber = $matches[4] . '-' . $matches[5] . '-' . $matches[6] . '-' . $matches[7];
-
-  if($matches[2]){
-  	if($matches[1])
-  		$phonenumber =  "+" . $matches[2] . " " . $phonenumber;
-  	else
-  		$phonenumber =  $matches[2] . " " . $phonenumber;
-  }
-
-  return $phonenumber;
-}
diff --git phone.cs.inc phone.cs.inc
deleted file mode 100644
index 66659a0..0000000
--- phone.cs.inc
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Czech phone numbers.
- */
-
-function phone_cs_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Czech Republic',
-    'error' => '"%value" is not a valid Czech phone number!<br>Czech phone numbers should contain only numbers and spaces be like 999 999 999 with an optional prefix of "+420" or "00420".',
-  );
-}
-
-/**
- * Verifies that $phonenumber is a valid nine-digit Czech phone number
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_cs_phone_number($phonenumber) {
-
-  $phonenumber = trim($phonenumber);
-
-  // define regular expression
-  $regex = '/^((?:\+|00)420)? ?(\d{3}) ?(\d{3}) ?(\d{3})$/';
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Convert a valid Czech phone number into standard (+420) 999 999 999 format
- *
- * @param $phonenumber must be a valid nine-digit number (with optional international prefix)
- *
- */
-function format_cs_phone_number($phonenumber, $field) {
-
-  // define regular expression
-  $regex = '/^((?:\+|00)420)? ?(\d{3}) ?(\d{3}) ?(\d{3})$/';
-
-  // get digits of phone number
-  preg_match($regex, $phonenumber, $matches);
-
-  if ($field['phone_country_code']) {
-    	$phonenumber = '+420' . ' ' . $matches[2] .' '. $matches[3] .' '. $matches[4];
-   }
-  else {
-  	$phonenumber = $matches[2] .' '. $matches[3] .' '. $matches[4];
-  }
-
-  return $phonenumber;
-}
diff --git phone.eg.inc phone.eg.inc
deleted file mode 100644
index 95fc346..0000000
--- phone.eg.inc
+++ /dev/null
@@ -1,144 +0,0 @@
-<?php
-
-/* 2009/10/24, Ahmad Gharbeia: initial release
-
-  General phone number format is +20 (#[#]) #######[#]
-  currently (10/2009) only Greater Cairo (including all of Giza) has 8 digits:
-Regional area codes:
-??????? ??????		2
-??????????			3
-?????????			13
-?????? ?? ?????	15
-???????				4
-???????				45
-?????					46
-????????				47
-????????				48
-????????				5
-???????				55
-?????					57
-??????				62
-???????????			64
-???????				65
-???????				66
-??????				68
-???? ?????			69
-??? ????				82
-??????				84
-??????				86
-?????					88
-?????? ??????		92
-?????					93
-??????					95
-???					96
-?????					97
-mobile network operators' area codes:
-	Mobinil: 12, 16
-	Vodafone: 10, 19
-	Etisalat: 11, 18
-
-  **/
-define('AREA_CODE_REGEX', "
-		(
-			 1(3|5)
-			|3
-			|4(5|6|7|8|)
-			|5(5|7|)
-			|6(2|4|5|6|8|9)
-			|8(2|4|6|8)
-			|9(2|3|5|6|7)
-		)
-");
-
-define('MOBILE_CODE_REGEX', "1(0|2|1|6|8|9)");		//area codes 10, 11, 12, 16, 18, or 19
-
-define('TELEPHONE_REGEX', "
-	(\+20)\s																					# optional countrycode optionally followed by a space
-		(
-				\(2\)\s(2|3)\d{3}\s\d{4}								# 8-digit numbers begining with 2 or 3 (Greater Cairo: Cairo and Giza, both having area code = 2)
-			|
-				\(" . AREA_CODE_REGEX . "\)\s\d{3}\s\d{4}		# all other areas' numbers have 7 digits. Checks for correct area codes
-			|
-				\(" . MOBILE_CODE_REGEX . "\)\s\d{3}\s\d{4}		# mobile operators' networks' area codes; followed by 7 digits
-		)
-		(\s\#\s\d+)?																# optional extension number shown with a hash divider
-");
-
-function phone_eg_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone numbers - Egypt',
-    'error' => '"%value" is not a valid phone number in Egypt. Telephone numbers in Egypt have the format +20 (#[#]) 1234567[8], where the digts between ( ) is the area or network code, without a leading zero; and digits between [ ] are optional',
-  );
-
-}#end function phone_eg_metadata;
-
-
-function valid_eg_phone_number($phonenumber) {
-/*
-	accepts:
-	properly formatted: [+20][ ][(]#[#][)][ ]1234[ ]567[#]
-	common: [(][0#[#]][)][ ]123[ ]456[#]
-	area code could be within paranthises and|or prefixed with 0
-*/
-
-  $regex = "/^						# the same as the model regex above, but with elements made optional
-		(\+20)?\s?																					# country code, with following space being optional
-   (
-				(\(0?2\)|0?2)\s?(2|3)\d{3}\s?\d{4}				# Greater Cairo, with leading optional zeros and optional braces around the area code
-			|
-				(\(0?" . AREA_CODE_REGEX . "\)|0?" . AREA_CODE_REGEX . ")\s?\d{3}\s?\d{4}					# other areas, with optional leading zeros and braces
-			|
-				(\(0?" . MOBILE_CODE_REGEX . "\)|0?" . MOBILE_CODE_REGEX . ")\s?\d{3}\s?\d{4}		# mobiles, with optional leading zeros and braces
-		)
-		(\s?\#\s?\d+)?  									# extension
-	$/x";
-
-  return (bool) preg_match($regex, $phonenumber);
-
-}#end function valid_eg_phone_number;
-
-
-function format_eg_phone_number($phonenumber, $field) {
-	if (preg_match("/^" . TELEPHONE_REGEX . "$/x", $phonenumber)) {		//already in proper format
-		return $phonenumber;
-	}
-	else {	//remove country code, zeros, and braces
-		$phonenumber = preg_replace("/(^(\+20)?\s?|\(0?|\)|^0?)/", '', $phonenumber);
-	}
-
-	//If there are some spaces in the number assume some level of preformatting
-  if (preg_match("/ /", $phonenumber)) {
-		$regex = "/^
-   	(
-				(\d{1,2})					# area code
-				\s*  						   # ignore required separator
-				(\d{3,4})					# 4 digits in case of Greater Cairo
-				\s*
-				(\d{4})
-			)
-			((\s*\#)?(\d*))?  									# extension
-		$/x";
-		preg_match($regex, $phonenumber, $matches);
-		$area = $matches[2];
-		$number = $matches[3] . ' ' . $matches[4];
-		$extension = $matches[7];
-  }
-  else {					//no spaces?, then apply some guessing
-		$regex = "/^  # order is important in this one
-			(
-					(\d)(\d{4})(\d{4})				# 2 area code, followed by 8 digits begining with 2 or 3: Greater Cairo
-				|
-					(\d{1,2})(\d{3})(\d{4})				# 1 or 2-digit area code followed by 7 digits: regional or mobile
-			)
-			((\s*\#)?(\d*))?
-		$/x";
-		preg_match($regex, $phonenumber, $matches);
-		$area = $matches[2];
-		$number = $matches[3] . ' ' . $matches[4];
-		$extension = $matches[5];
-  }
-
-	return '+20 (' . $area . ') ' . $number . (empty($extension) ? '' : " #$extension");
-}#end function format_eg_phone_number;
-
diff --git phone.el.inc phone.el.inc
deleted file mode 100644
index d41fd10..0000000
--- phone.el.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Greek phone numbers.
- */
-
-function phone_el_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Greece',
-    'error' => '"%value" is not a valid Greek phone number<br>Greek phone numbers should only ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is valid 
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_el_phone_number($phonenumber) {
-  // define regular expression
-  $regex = "/^(\+30)?[ ]?([0-9]{3,4}(\/|-| )?[0-9]{6,7})$/i";
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Greek Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_el_phone_number($phonenumber, $field) {
-
-  //$phonenumber = trim($phonenumber);
-
-   // do some formatting on the phone number
-   $phonenumber = str_replace("[ -]", "", $phonenumber);
-
-   if ($field['phone_country_code']) {
-      if ($matches[1] != "+30") {
-  	$phonenumber = "+30" . " " . $phonenumber;
-      }
-   }
-
-   return $phonenumber;
-}
diff --git phone.es.inc phone.es.inc
deleted file mode 100644
index ca781c2..0000000
--- phone.es.inc
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Spanish phone numbers.
- */
-
-function phone_es_metadata() {
-   // These strings are translated using t() on output.
-   return array(
-     'label' => 'Phone Numbers - Spain',
-     'error' => '"%value" is not a valid Spanish phone number<br>Spanish phone numbers should only contains numbers and spaces and be like 999 999 999',
-   );
- }
-
-
-/**
- * Verifies that $phonenumber is a valid nine-digit Spanish phone number
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_es_phone_number($phonenumber) {
-
-  $phonenumber = trim($phonenumber);
-
-  // define regular expression
-  //$regex = "/
-  //  \D*           # optional separator
-  //  [69]\d{2}     # first group of numbers
-  //  \D*           # optional separator
-  //  \d{3}         # second group
-  //  \D*           # optional separator
-  //  \d{3}         # third group
-  //  \D*           # ignore trailing non-digits
-  //  $/x";
-    
-    $regex = '/^[0-9]{2,3}-? ?[0-9]{6,7}$/';
-
-    
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Convert a valid Spanish phone number into standard (+34) 916 555 777 format
- *
- * @param $phonenumber must be a valid nine-digit number (with optional international prefix)
- *
- */
-function format_es_phone_number($phonenumber, $field = FALSE) {
-
-  // define regular expression
-  //$regex = "/
-  //  \D*           # optional separator
-  //  ([69]\d{2})   # first group of numbers
-  //  \D*           # optional separator
-  //  (\d{3})       # second group
-  //  \D*           # optional separator
-  //  (\d{3})       # third group
-  //  \D*           # ignore trailing non-digits
-  //  $/x";
-
-  $regex = '/^[0-9]{2,3}-? ?[0-9]{6,7}$/';
-  
-  // get digits of phone number
-  preg_match($regex, $phonenumber, $matches);
-
-  // construct ten-digit phone number
-  $phonenumber = $matches[1] . ' ' . $matches[2] . ' ' . $matches[3];
-
-  return $phonenumber;
-}
-
diff --git phone.fr.inc phone.fr.inc
deleted file mode 100644
index 8f06e4e..0000000
--- phone.fr.inc
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for French phone numbers.
- */
-
-define('PHONE_FR_REGEX', '/(\+33|0)([1-9]\d{8}|85\d{7}|87[0-57-9]\d{6})$/');
-
-function phone_fr_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - France',
-    'error' => '"%value" is not a valid French phone number<br>French phone numbers should only contain numbers and spaces and be like 99 99 99 99 99',
-  );
-}
-
-/**
- * Verification for French Phone Numbers.
- * According to http://www.itu.int/itudoc/itu-t/number/f/fra/70680.html
- *    (Released 2006/01/26, retrieved 2008/08/12)
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_fr_phone_number($phonenumber) {
-
-  //$phonenumber = trim($phonenumber);
-
-  $phonenumber  = str_replace(array(' ','-','(',')'), '', $phonenumber);
-  return (bool) preg_match(PHONE_FR_REGEX, $phonenumber);
-}
-
-/**
- * Formatting for French Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_fr_phone_number($phonenumber, $field = FALSE) {
-  $phone  = str_replace(array(' ','-','(',')'), '', $phonenumber);
-  if (preg_match(PHONE_FR_REGEX, $phone, $matches) != 1) {
-    return $phonenumber; // not a french phone number
-  }
-
-  return ($field && $field['phone_country_code'] ? '+33 ' : '0') . $matches[2];
-}
diff --git phone.gb.inc phone.gb.inc
deleted file mode 100644
index 16c95ed..0000000
--- phone.gb.inc
+++ /dev/null
@@ -1,144 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for British phone numbers.
- */
-
-function phone_gb_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Great Britain - England (UK)',
-    'error' => '"%value" is not a valid British (UK) phone number<br>British Phone numbers should .... ',
-  );
-}
-
-/**
- * Verifies that $phonenumber is a valid eleven-digit United Kingdom phone number
- *
- * Regular expression adapted from Amos Hurd's regex at RegExLib.com
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-
-function valid_gb_phone_number($phonenumber) {
-
-  /*
-    Accepts:
-        +441970123456
-        +44(0)1970123456
-        +44 1970 123 456
-        +44 (0)1970 123 456
-        (01970) 123456 #0001
-    Rejects:
-        (+441970)123456
-        +44(1970)123456
-        +44 01970 123 456
-        (0197) 0123456 #01
-  */
-  $regex = "/
-    (
-        (^\+44\s?(\(0\))?\d{4}|^\(?0\d{4}\)?){1}\s?\d{3}\s?\d{3}  # 4 digit area code with optional +44 internationalisation or not, optional spaces and brackets.
-        |
-        (^\+44\s?(\(0\))?\d{3}|^\(?0\d{3}\)?){1}\s?\d{3}\s?\d{4}  # 3 digit area code with optional +44 internationalisation or not, optional spaces and brackets.
-        |
-        (^\+44\s?(\(0\))?\d{2}|^\(?0\d{2}\)?){1}\s?\d{4}\s?\d{4}  # 2 digit area code with optional +44 internationalisation or not, optional spaces and brackets.
-        |
-        (^\+44\s?(\(0\))?\d{1}|^\(?0\d{1}\)?){1}\s?\d{5}\s?\d{5}  # 1 digit area code with optional +44 internationalisation or not, optional spaces and brackets.        
-    )
-    (\s?\#\d*)?   # optional extension number shown with a hash divider
-  /x";
-
-  if (!preg_match($regex, $phonenumber)) {
-  	return FALSE;
-  }
-  else
-  {
-	return TRUE;
-  }
-}
-
-/**
- * Convert a valid United Kingdom phone number into standard +44 (0)1970 123 456 #001 international format
- *
- * @param $phonenumber must be a valid eleven-digit number (with optional extension)
- *
- */
-function format_gb_phone_number($phonenumber, $field = FALSE) {
-
-    $area = $number = $extension = '';
-
-    //If we already have the formatting we want just return
-    if (preg_match(
-    "/
-        (
-            \+44\s\(0\)\d{4}\s\d{3}\s\d{3}  # 4 digit area code
-            |
-            \+44\s\(0\)\d{3}\s\d{3}\s\d{4}  # 3 digit area code
-            |
-            \+44\s\(0\)\d{2}\s\d{4}\s\d{4}  # 2 digit area code
-        )
-        (\s\#\d*)?
-    /",$phonenumber)) {
-        return $phonenumber;
-    }
-    else {
-        //Simplify to 10 digit number and clean up ready for international reformat.
-        $phonenumber = preg_replace("/^(\+44)?\s?(\(?0\)?)?/","",$phonenumber);
-        $phonenumber = preg_replace("/\(/","",$phonenumber);
-        $phonenumber = preg_replace("/\(0/","",$phonenumber);
-        $phonenumber = preg_replace("/\)/","",$phonenumber);
-
-        //If there are some spaces in the number assume some level of preformatting
-        if(preg_match("/ /",$phonenumber)) {
-            $regex = "/
-                # 4 digit area code.
-                (
-                    (\d{4}) # capture 4 digit area code
-                    \s+     # ignore required separator to make a distinction with other area codes
-                    (\d{3}) # capture first set of numbers in the local number
-                    \s*     # ignore optional separator
-                    (\d{3}) # capture second set of numbers in the local number
-                |
-                # 3 digit area code.
-                    (\d{3}) # capture 3 digit area code
-                    \s+     # ignore required seperator
-                    (\d{3}) # capture first set of numbers in the local number
-                    \s*     # ignore possible boundary
-                    (\d{4}) # capture second set of numbers in the local number
-                |
-                # 2 digit area code.
-                    (\d{2}) # capture 2 digit area code
-                    \s+     # ignore required boundary to make a distinction with other area codes
-                    (\d{4}) # capture first set of numbers in the local number
-                    \s*     # ignore possible boundary
-                    (\d{4}) # capture second set of numbers in the local number
-                )
-                # capture the optional extension number
-                (\s*\#)?
-                (\d{4}|\d{3})?
-            /x";
-            preg_match($regex, $phonenumber, $matches);
-            $area = $matches[2].$matches[5].$matches[8];
-            $number = $matches[3].$matches[6].$matches[9].' '.$matches[4].$matches[7].$matches[10];
-            $extension = $matches[12];
-        }
-        //If there are no spaces in the number assume 4 digit area code.
-        else {
-            preg_match("/(\d{4})(\d{3})(\d{3})\#?(\d*)?/",$phonenumber, $matches);
-            $area = $matches[1];
-            $number = $matches[2].' '.$matches[3];
-            $extension = $matches[4];
-        }
-	
-      if ($field['phone_country_code']) {	
-      	$phonenumber = '+44 (0)'.$area.' '.$number;
-      }
-      else {
-      	$phonenumber = '0'.$area.' '.$number;
-      }
-      $phonenumber .= (empty($extension))?'':" #$extension";
-  }
-  return $phonenumber;
-}
diff --git phone.hu.inc phone.hu.inc
deleted file mode 100644
index afcd6bf..0000000
--- phone.hu.inc
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Hungarian phone numbers.
- */
-
-function phone_hu_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Hungary',
-    'error' => '"%value" is not a valid Hungarian phone number!<br>Hungarian phone numbers should contain only numbers and spaces be like 70 999 9999 with an optional prefix of "+36" or "06".',
-  );
-}
-
-/**
- * Verifies that $phonenumber is a valid nine-digit Hungarian phone number
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_hu_phone_number($phonenumber) {
-
-  //$phonenumber = trim($phonenumber);
-
-  // define regular expression
-  $regex = "/
-    \D*           # optional separator
-	(?:\+?36|06)? # country code
-    (\d\d?)       # area code
-    \D*           # optional separator
-    (\d{3})       # second group
-    \D*           # optional separator
-    (\d{3,4})     # third group
-    \D*           # ignore trailing non-digits
-    $/x";
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Convert a valid Hungarian phone number into standard (+36) ..... format
- *
- * @param $phonenumber must be a valid nine-digit number (with optional international prefix)
- *
- */
-function format_hu_phone_number($phonenumber, $field = FALSE) {
-
-  // define regular expression
-  $regex = "/
-    \D*           # optional separator
-	(?:\+?36|06)? # country code
-    (\d\d?)       # area code
-    \D*           # optional separator
-    (\d{3})       # second group
-    \D*           # optional separator
-    (\d{3,4})     # third group
-    \D*           # ignore trailing non-digits
-    $/x";
-
-  // get digits of phone number
-  preg_match($regex, $phonenumber, $matches);
-
-  // construct ten-digit phone number
-  $phonenumber = '+36 ' . $matches[1] . ' ' . $matches[2] . ' ' . $matches[3] . ' ' . $matches[4];
-
-  return $phonenumber;
-}
-
diff --git phone.il.inc phone.il.inc
deleted file mode 100644
index a110e3a..0000000
--- phone.il.inc
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-//drived from au module and manipulated by Moshe Beeri, email: moshe.beeri (at-shetrudel) google mail
-
-/**
-* @file
-* CCK Field for Isreali phone numbers.
-*/
-
-function phone_il_metadata() {
-  return array(
-    'label' => 'Phone Numbers - Israel',
-    'error' => '"%value" is not a valid Israeli phone number',
-  );
-}
-
-/**
-* Verification for Israel Phone Numbers.
-*
-* @param string $phonenumber
-* @return boolean Returns boolean FALSE if the phone number is not valid.
-*/
-function valid_il_phone_number($phonenumber) {
-
-  //$phonenumber = trim($phonenumber);
-
-  // strip formatting chars
-  $phonenumber = preg_replace('/[\-() ]/', '', $phonenumber);
-  // strip optional '+972' or '0' prefixes
-  $phonenumber = preg_replace('/^(\+972)/', '', $phonenumber);
-
-  //$rules[] = array("Prefix","Minimum length","Maximum length");
-
-//http://he.wikipedia.org/wiki/%D7%A7%D7%99%D7%93%D7%95%D7%9E%D7%AA_%D7%98%D7%9C%D7%A4%D7%95%D7%9F
-
-  $rules[] = array("02", 7, 10);
-  $rules[] = array("03", 7, 10);
-  $rules[] = array("04", 7, 10);
-  $rules[] = array("08", 7, 10);
-  $rules[] = array("09", 7, 10);
-  $rules[] = array("072", 7, 10);
-  $rules[] = array("073", 7, 10);
-  $rules[] = array("074", 7, 10);
-  $rules[] = array("076", 7, 10);
-  $rules[] = array("077", 7, 10);
-  $rules[] = array("078", 7, 10);
-  $rules[] = array("050", 7, 10);
-  $rules[] = array("052", 7, 10);
-  $rules[] = array("054", 7, 10);
-  $rules[] = array("057", 7, 10);
-  $rules[] = array("1800", 6, 10);
-  $rules[] = array("1801", 6, 10);
-  $rules[] = array("1700", 6, 10);
-
-  foreach ($rules as $rule) {
-    if (preg_match('/^'.$rule[0].'/', $phonenumber) && strlen($phonenumber) >= $rule[1] && strlen($phonenumber) <= $rule[2]) {
-      return TRUE;
-    }
-  }
-  return FALSE;
-}
-
-/**
-* Formatting for Israeli Phone Numbers. Based upon ITU-T E.123 (but let's not get too crazy)
-*
-* @param string $phonenumber
-* @return string Returns a string containing the phone number with some formatting.
-*/
-function format_il_phone_number($phonenumber) {
-  $prefix = '';
-  $extension = '';
-  // strip old formatting chars
-  $phonenumber = preg_replace('/[\-() ]/', '', $phonenumber);
-
-  /*
-  * strip and save the +9726 prefix if found
-  */
-  if (preg_match('/^\+972/', $phonenumber, $match)) {
-    $prefix = '+972 ';
-    $phonenumber = str_replace('+972', '', $phonenumber);
-  }
-
-
-  /*
-  * 9 phones digit numbers
-  * Eg. 03 9999 999
-  */
-  if (preg_match('/^([0-9]{2})([0-9]{4})([0-9]{3})$/', $phonenumber, $match)) {
-    return $prefix . $match[1] . ' ' . $match[2] . ' ' . $match[3] . $extension;
-  }
-
-  /*
-  * 10 digit numbers
-  * Eg. 1800 999 999
-  */
-  if (preg_match('/^([0-9]{4})([0-9]{3})([0-9]{3})$/', $phonenumber, $match)) {
-    return $prefix . $match[1] . ' ' . $match[2] . ' ' . $match[3] . $extension;
-  }
-  
-  /*
-  * cell phone
-  * Eg. 054 9999 999
-  */
-  if (preg_match('/^([0-9]{3})([0-9]{4})([0-9]{3})$/', $phonenumber, $match)) {
-    return $prefix . $match[1] . ' ' . $match[2] . ' ' . $match[3] . $extension;
-  }   
-
-  // default
-  return $prefix . $phonenumber . $extension;
-}
diff --git phone.info phone.info
index 23055e3..570c060 100644
--- phone.info
+++ phone.info
@@ -1,6 +1,34 @@
-name = Phone - CCK
-description = "The phone module allows administrators to define a CCK field type for phone numbers."
-package = CCK
-dependencies[] = content
-core = 6.x
+name = Phone
+description = The phone module allows administrators to define a field type for phone numbers.
+package = Fields
+files[] = tests/phone.au.test
+files[] = tests/phone.be.test
+files[] = tests/phone.br.test
+files[] = tests/phone.ca.test
+files[] = tests/phone.ch.test
+files[] = tests/phone.cl.test
+files[] = tests/phone.cn.test
+files[] = tests/phone.cr.test
+files[] = tests/phone.cs.test
+files[] = tests/phone.eg.test
+files[] = tests/phone.es.test
+files[] = tests/phone.fr.test
+files[] = tests/phone.hu.test
+files[] = tests/phone.il.test
+files[] = tests/phone.int.test
+files[] = tests/phone.it.test
+files[] = tests/phone.jo.test
+files[] = tests/phone.nl.test
+files[] = tests/phone.nz.test
+files[] = tests/phone.pa.test
+files[] = tests/phone.ph.test
+files[] = tests/phone.pk.test
+files[] = tests/phone.pl.test
+files[] = tests/phone.ru.test
+files[] = tests/phone.se.test
+files[] = tests/phone.sg.test
+files[] = tests/phone.ua.test
+files[] = tests/phone.uk.test
+files[] = tests/phone.za.test
+core = 7.x
 
diff --git phone.install phone.install
index 3595e6b..2d132e2 100644
--- phone.install
+++ phone.install
@@ -2,91 +2,24 @@
 
 /**
  * @file
- * Defines phone number fields for CCK.
- * Installation file
+ * Install/Update/Uninstall functions for phone module
  */
 
 /**
- * Implementation of hook_content_notify().
- *
- * This hook should be implemented inside hook_install(), hook_uninstall(),
- * hook_enable() and hook_disable(), and is used to notify the content
- * module when a field module is added or removed so it can respond
- * appropriately. One use of this hook is to allow the content module
- * to remove fields and field data created by this module when the
- * module is uninstalled.
- *
- * The recommended location for these hooks is in the module's .install file.
+ * Implements hook_field_schema().
  */
-
-/**
- * Implementation of hook_install().
- */
-function phone_install() {
-  drupal_load('module', 'content');
-  content_notify('install', 'phone');
-  drupal_set_message(t('Phone module installed successfully.'));
+function phone_field_schema($field) {
+  return array(
+    'columns' => array(
+      'value' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => FALSE,
+      ),
+    ),
+  );
 }
 
-/**
- * Implementation of hook_uninstall().
- */
-function phone_uninstall() {
-  drupal_load('module', 'content');
-  content_notify('uninstall', 'phone');
-}
 
-/**
- * Implementation of hook_enable().
- *
- * Notify content module when this module is enabled.
- */
-function phone_enable() {
-  drupal_load('module', 'content');
-
-  //The 2 next lines are for 5.x to 6.x upgrade
-  db_query("UPDATE {". content_instance_tablename() ."} SET widget_module = 'phone' WHERE widget_type = 'phone'");
-  db_query("UPDATE {". content_instance_tablename() ."} SET widget_type = 'phone_textfield' WHERE widget_type = 'phone'");
-
-  content_notify('enable', 'phone');
-}
-
-/**
- * Implementation of hook_disable().
- *
- * Notify content module when this module is disabled.
- */
-function phone_disable() {
-  drupal_load('module', 'content');
-  content_notify('disable', 'phone');
-}
-
-/**
- * Fixing update : field setting 'not null' => TRUE can cause problems with MySQL in strict mode
- */
-function phone_update_6200() {
-  $ret = array();
-
-  module_load_include('inc', 'content', 'includes/content.crud');
-  $fields = content_fields();
-
-  foreach ($fields as $field) {
-
-    if (substr($field['type'], 3) == 'phone') {
-
-      //drupal_set_message('field type = phone ==> ' . $field['type']);
-
-      $db_info = content_database_info($field);
-      if (isset($db_info['columns']['value'])) {
-        $table = $db_info['table'];
-        $value_column = $db_info['columns']['value']['column'];
-        //drupal_set_message('table = ' . $table, 'error');
-        //drupal_set_message('value_column = ' . $value_column, 'error');
-
-        $ret[] = update_sql("ALTER TABLE {" . $table ."} CHANGE " .$value_column . " " .$value_column . " VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
-      }
-    }
-  }
-  drupal_set_message("Phone fields have been updated.");
-  return $ret;
-}
+// TODO: data migration from the old DB structure, could be tough..
+ 
diff --git phone.int.inc phone.int.inc
deleted file mode 100644
index 38e6dba..0000000
--- phone.int.inc
+++ /dev/null
@@ -1,347 +0,0 @@
-<?php
-
-/**
- * Verifies that $phonenumber is a valid international phone number as per ITU or,
- * if a default country code is specified, a valid subscriber number.
- *
- * @see http://www.itu.int/rec/T-REC-E.123/en
- *
- * @param $phonenumber
- *   International phone number to validate
- * @return
- *   TRUE if valid, FALSE if otherwise.
- */
-function valid_int_phone_number($phonenumber) {
-  $phonenumber = trim($phonenumber);
-  if ($phonenumber === '') {
-    return FALSE;
-  }
-  $phonenumber = _normalize_country_code($phonenumber);
-  $base_phonenumber = str_replace(array('.', '(', ')', '[', ']', '-', '+', ' '), '', $phonenumber);
-  if (!isset($field['phone_int_max_length'])) {
-    $field['phone_int_max_length'] = 15;
-  }
-  if (strlen($base_phonenumber) > $field['phone_int_max_length']) {
-    $error = t('Invalid international phone number: Phone number is too long; international phone numbers are limited to 15 digits.');
-    return FALSE;
-  }
-  // Check if digits are used in the base_phonenumber
-  if (!ctype_digit($base_phonenumber)) {  
-    $error = t('Invalid international phone number: Phone number contains invalid characters; only allowed characters are numbers and punctuation.');
-    return FALSE;
-  }
-  // Extract country code and see if it's correct:
-  preg_match('/^\+(\d+)/', $phonenumber, $matches);
-  $cc = $matches[1];
-  if (strlen($cc) > 3) {
-    $error = array(
-      t('Invalid international phone number: Country code "+%cc" is too long; valid country codes are three digits or less.'),
-      array('%cc' => $cc)
-    );
-    return FALSE;
-  }
-  
-  //drupal_set_message('langue cc = ' . $cc, 'error');
-
-  // TODO: Check if parentheses/brackets add up.
-  // TODO: Validate the number against the country rules.
-  // For now, validate only against a limited number of countries.
-
-  $countrycode = phone_country_code_convert($cc);
-  //drupal_set_message('langue countrycode = ' . $countrycode, 'error');
-  if (!empty($countrycode)) {
-      $valid_phone_function = 'valid_'. $countrycode . '_phone_number';
-      module_load_include('inc', 'phone', 'phone.'. $countrycode);
-      if (function_exists($valid_phone_function)) {
-        return $valid_phone_function($phonenumber, $field);
-      }
-      else {
-      	return TRUE; 
-      }
-  }
-  
-  return FALSE;
-}
-
-/**
- * Formats $phonenumber into the standard representation of international
- * numbers as per E.123.
- *
- * @param $phonenumber
- *   International phone number to format
- * @return
- *   Formatted international phone number
- */
-function format_int_phone_number($phonenumber, $field = array()) {
-  $phonenumber = trim($phonenumber);
-  if ($phonenumber === '') {
-    return '';
-  }
-  $phonenumber = _normalize_country_code($phonenumber, $field);
-  $bits = preg_split('/[.()\[\]\- ]/', $phonenumber, -1, PREG_SPLIT_NO_EMPTY);
-  // $bits[0] is the country code WITH a plus sign.
-  if (isset($bits[1])) {
-    // This is the first non-CC segment, so it could have the NDN.
-    switch ($bits[1][0]) {
-      case 0:
-        $bits[1] = substr($bits[1], 1);
-        break;
-    }
-    switch ($bits[1]) {
-      case 0:
-      case 7:
-      case 8:
-        array_splice($bits, 1, 1);
-        break;
-    }
-  }
-  return implode(' ', $bits);
-}
-
-/**
- * Adds a country code to a phone number if necessary.
- *
- * @param $phonenumber
- *   International or local phone number to format
- * @return
- *   International phone number with country code
- */
-function _normalize_country_code($phonenumber, $field = array()) {
-  if ($phonenumber[0] !== '+') {
-    $cc = isset($field['phone_default_country_code']) ? $field['phone_default_country_code'] : '1';
-    return "+$cc $phonenumber";
-  }
-  return $phonenumber;
-}
-
-/**
- * Returns the country code in the desired format.
- *
- * @todo Fill in the rest of the country code values.
- *
- * @param $code
- *   Country code to convert (either numeric or 2-letter abbreviation)
- * @param $input_type
- *   Type of country code to convert (either numeric or 2-letter abbreviation)
- * @return
- *   Converted country code
- */
-function phone_country_code_convert($code, $input_type = 'digits') {
-   static $codes;
-   if (!$codes) {
-    $codes = array(    
-      '1' => 'ca',
-      '1' => 'us',
-      '7' => 'ru',
-      '20' => 'eg',
-      '27' => 'za',
-      '30' => 'gr',
-      '31' => 'nl',
-      '32' => 'be',
-      '33' => 'fr',
-      '34' => 'es',
-      '36' => 'hu',
-      '39' => 'it',
-      '39' => 'va',
-      '40' => 'ro',
-      '41' => 'ch',
-      '43' => 'at',
-      '44' => 'gb',
-      '45' => 'dk',
-      '46' => 'se',
-      '47' => 'no',
-      '48' => 'pl',
-      '49' => 'de', 
-      '51' => 'pe',
-      '52' => 'mx',
-      '53' => 'cu',
-      '54' => 'ar',
-      '55' => 'br',
-      '56' => 'cl',
-      '57' => 'co',
-      '58' => 've',    
-      '60' => 'my',
-      '61' => 'au',
-      '61' => 'cc',
-      '61' => 'cx',
-      '62' => 'id',
-      '63' => 'ph',
-      '64' => 'nz',
-      '65' => 'sg',
-      '66' => 'th',
-      '81' => 'jp',
-      '82' => 'kr',
-      '84' => 'vn',
-      '86' => 'cn',
-      '90' => 'tr',
-      '91' => 'in',
-      '92' => 'pk',
-      '93' => 'af',
-      '94' => 'lk',
-      '95' => 'mm',
-      '98' => 'ir', 
-      '212' => 'ma',
-      '213' => 'dz',
-      '216' => 'tn',
-      '218' => 'ly',
-      '220' => 'gm',
-      '221' => 'sn',
-      '222' => 'mr',
-      '223' => 'ml',
-      '224' => 'gn',
-      '225' => 'ci',
-      '226' => 'bf',
-      '227' => 'ne',
-      '228' => 'tg',
-      '229' => 'bj',
-      '230' => 'mu',
-      '231' => 'lr',
-      '232' => 'sl',
-      '233' => 'gh',
-      '234' => 'ng',
-      '235' => 'td',
-      '236' => 'cf',
-      '237' => 'cm',
-      '238' => 'cv',
-      '239' => 'st',
-      '240' => 'gq',
-      '241' => 'ga',
-      '242' => 'cg',
-      '243' => 'cd',
-      '244' => 'ao',
-      '245' => 'gw',
-      '246' => 'io',
-      '248' => 'sc',
-      '249' => 'sd',
-      '250' => 'rw',
-      '251' => 'et',
-      '252' => 'so',
-      '253' => 'dj',
-      '254' => 'ke',
-      '255' => 'tz',
-      '256' => 'ug',
-      '257' => 'bi',
-      '258' => 'mz',
-      '260' => 'zm',
-      '261' => 'mg',
-      '263' => 'zw',
-      '264' => 'na',
-      '265' => 'mw',
-      '266' => 'ls',
-      '267' => 'bw',
-      '268' => 'sz',
-      '269' => 'km',
-      '269' => 'yt',
-      '290' => 'sh',
-      '291' => 'er',
-      '297' => 'aw',
-      '298' => 'fo',
-      '299' => 'gl',
-      '350' => 'gi',
-      '351' => 'pt',
-      '352' => 'lu',
-      '353' => 'ie',
-      '354' => 'is',
-      '355' => 'al',
-      '356' => 'mt',
-      '357' => 'cy',
-      '358' => 'fi',
-      '359' => 'bg',
-      '370' => 'lt',
-      '371' => 'lv',
-      '372' => 'ee',
-      '373' => 'md',
-      '374' => 'am',
-      '375' => 'by',
-      '376' => 'ad',
-      '377' => 'mc',
-      '378' => 'sm',
-      '380' => 'ua',
-      '381' => 'rs',
-      '382' => 'me',
-      '385' => 'hr',
-      '386' => 'si',
-      '387' => 'ba',
-      '389' => 'mk',   
-      '420' => 'cz',
-      '421' => 'sk',
-      '423' => 'li',
-      '500' => 'fk',
-      '501' => 'bz',
-      '502' => 'gt',
-      '503' => 'sv',
-      '504' => 'hn',
-      '505' => 'ni',
-      '506' => 'cr',
-      '507' => 'pa',
-      '508' => 'pm',
-      '509' => 'ht',
-      '590' => 'gp',
-      '591' => 'bo',
-      '592' => 'gy',
-      '593' => 'ec',
-      '594' => 'gf',
-      '595' => 'py',
-      '596' => 'mq',
-      '597' => 'sr',
-      '598' => 'uy',
-      '599' => 'an',
-      '670' => 'tp',
-      '672' => 'nf',
-      '673' => 'bn',
-      '674' => 'nr',
-      '675' => 'pg',
-      '676' => 'to',
-      '677' => 'sb',
-      '678' => 'vu',
-      '679' => 'fj',
-      '680' => 'pw',
-      '681' => 'wf',
-      '682' => 'ck',
-      '683' => 'nu',
-      '686' => 'ki',
-      '687' => 'nc',
-      '688' => 'tv',
-      '689' => 'pf',
-      '690' => 'tk',
-      '691' => 'fm',
-      '692' => 'mh', 
-      '850' => 'kp',
-      '852' => 'hk',
-      '853' => 'mo',
-      '855' => 'kh',
-      '856' => 'la',
-      '880' => 'bd',
-      '886' => 'tw', 
-      '960' => 'mv',
-      '961' => 'lb',
-      '962' => 'jo',
-      '963' => 'sy',
-      '964' => 'iq',
-      '965' => 'kw',
-      '966' => 'sa',
-      '967' => 'ye',
-      '968' => 'om',
-      '970' => 'ps',
-      '971' => 'ae',
-      '972' => 'il',
-      '973' => 'bh',
-      '974' => 'qa',
-      '975' => 'bt',
-      '976' => 'mn',
-      '977' => 'np',
-      '992' => 'tj',
-      '993' => 'tm',
-      '994' => 'az',
-      '995' => 'ge',
-      '996' => 'kg',
-      '998' => 'uz',      
-    );
-   }
-
-  if ($input_type == 'alpha') {
-    $codes = array_flip($codes);
-  }
-  return isset($codes[$code]) ? $codes[$code] : FALSE;
-}
-
diff --git phone.it.inc phone.it.inc
deleted file mode 100644
index 2a77bd5..0000000
--- phone.it.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Italian phone numbers.
- */
-
-function phone_it_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Italy',
-    'error' => '"%value" is not a valid Italian phone number<br>Italian phone numbers should only ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is valid 
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_it_phone_number($phonenumber) {
-  // define regular expression
-  $regex = "/^(\+39)?[ ]?([0-9]{2,3}(\/|-| )?[0-9]{6,7})$/i";
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Italian Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_it_phone_number($phonenumber, $field) {
-
-  //$phonenumber = trim($phonenumber);
-
-   // do some formatting on the phone number
-   $phonenumber = str_replace("[ -]", "", $phonenumber);
-
-   if ($field['phone_country_code']) {
-      if ($matches[1] != "+39") {
-  	$phonenumber = "+39" . " " . $phonenumber;
-      }
-   }
-
-   return $phonenumber;
-}
diff --git phone.jo.inc phone.jo.inc
deleted file mode 100644
index 8d5aa9f..0000000
--- phone.jo.inc
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-
-/**
- * This plugin is contributed by Untitled Web http://untitledstudios.com
- * @author Rashad Majali <rashad.612@gmail.com> http://drupal.org/user/319686
- * @file
- * CCK Field for Jordanian phone numbers.
- */
-
-function phone_jo_metadata(){
-  // These strings are translated using t() on output.
-  return array(
-    'value' => 'Phone Numbers - Jordany',
-    'error' => '"%value" is not a valid Jordanian phone number, Please check the spaces and dashes in your number.',
-  );
-}
-
-/**
- * Verification for Jordanian Phone Numbers.
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_jo_phone_number($phonenumber){
-
-  /**
-  Accepts:
-
-    Mobile numbers: (X refers to network code, it might be 7,8,9).
-
-      +9627X1234567
-      +962-7X1234567
-      +962 7X1234567
-      009627X1234567
-      00962-7X1234567
-      00962 7X1234567
-
-      962... accepted as well
-
-      07X1234567
-
-    Local area numbers: (X refers to region code, i.e. Amman[6], north [2], middle [5], south[3]).
-      +962X1234567
-      +962-X-1234567
-      +962X-1234567
-      +962 X 1234567
-      +962X 1234567
-      +962 X1234567
-
-      00962X1234567
-      00962-X-1234567
-      00962X-1234567
-      00962 X 1234567
-      00962X 1234567
-      00962 X1234567
-
-      962... accepted as well
-
-      0X1234567
-      0X-1234567
-      0X 1234567
-
-  Rejects:
-
-    Generally rejects any number without leading code.
-    starts with X instead of 0X
-
-    Mobile:
-      7X1234567
-      7 X1234567 and similar formats
-      +962 7 X1234567 and similar formats
-
-    Local:
-      X1234567
-      X-1234567
-      X 1234567 and similar formats
-
-  */
-  $regex = "/(^(\+962|00962|962|0)[-\s]{0,1}[7]{1}[7-9]{1}[0-9]{7}$) | (^(\+962|00962|962|0)[-\s]{0,1}[2-6][-\s]{0,1}[0-9]{7}$)/x";
-
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Jordanian Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_jo_phone_number($phonenumber, $field = FALSE){
-
-
-  $phonenumber = trim($phonenumber);
-  $regex = "/(^(\+962|00962|962|0)[-\s]{0,1}[7]{1}[7-9]{1}[0-9]{7}$) | (^(\+962|00962|962|0)[-\s]{0,1}[2-6][-\s]{0,1}[0-9]{7}$)/x";
-  preg_match($regex, $phonenumber, $matches);
-
-  $phonenumber = preg_replace('/^(\+962|00962|962|0)|[-\s]/', '', $matches[0]);
-
-
-  return '+962'.$phonenumber;
-
-}
diff --git phone.module phone.module
index 76e9f3f..867eef3 100644
--- phone.module
+++ phone.module
@@ -3,873 +3,299 @@
 // Copyright 2009 Thierry GUEGAN http://www.arvoriad.com
 
 /**
- * @file
- * Defines phone number fields for CCK.
- * Provide some verifications on the phone numbers
+ * Function which holds an array of supported countries. 
+ *
+ * @param string $countrycode
+ * @return boolean Returns the whole array of countries $countrycode isn't specified and a country name for when it is specified.
  */
+function phone_countries($code = NULL) {
+  static $countries;
+  
+  if (!isset($countries)) {
+   $countries = array(
+      'fr' => 'France',
+      'be' => 'Belgium',
+      'it' => 'Italy',
+      'el' => 'Greece',
+      'ch' => 'Switzerland',
+      'ca' => 'US & Canada',
+      'cr' => 'Costa Rica',
+      'pa' => 'Panama',
+      'gb' => 'Great Britain - United Kingdom',
+      'ru' => 'Russia',
+      'ua' => 'Ukraine - in Kiev',
+      'es' => 'Spain',
+      'au' => 'Australia',
+      'cs' => 'Czech Republic',
+      'hu' => 'Poland - mobiles only',
+      'pl' => 'Netherland',
+      'nl' => 'Netherland',
+      'se' => 'Sweden',
+      'za' => 'South Africa',
+      'il' => 'Israel',
+      'nz' => 'New Zealand',
+      'br' => 'Brazil',
+      'cl' => 'Chile',
+      'cn' => 'China',      			
+      'hk' => 'Hong-Kong',
+      'mo' => 'Macao',
+      'ph' => 'The Philippines',
+      'sg' => 'Singapore',
+      'jo' => 'Jordan',
+      'eg' => 'Egypt',
+      'pk' => 'Pakistan',
+      'int' => 'International Phone Numbers per E.123',
+    );
+  }
+  return ($code === NULL) ? $countries : (isset($countries[$code]) ? $countries[$code] : NULL);
+}
+
+
+////////////////////////////////////////////
+/// Field API hooks implementation
+////////////////////////////////////////////
 
 /**
  * Implementation of hook_field_info().
- *
- * Here we indicate that the content module will use its default
- * handling for the view of this field.
- *
- * Callbacks can be omitted if default handing is used.
- * They're included here just so this module can be used
- * as an example for custom modules that might do things
- * differently.
- *
- * If your module will provide its own Views tables or arguments,
- * change CONTENT_CALLBACK_DEFAULT to CONTENT_CALLBACK_CUSTOM.
- *
- * IMPORTANT! - field and widget names will be truncated to 32 characters in
- * the database and in internal arrays, like content_fields().
  */
 function phone_field_info() {
   return array(
-    'fr_phone' => array('label' => t('Phone Numbers - France')),
-    'be_phone' => array('label' => t('Phone Numbers - Belgium')),
-    'it_phone' => array('label' => t('Phone Numbers - Italy')),
-    'el_phone' => array('label' => t('Phone Numbers - Greece')),    
-    'ch_phone' => array('label' => t('Phone Numbers - Switzerland')),
-    'ca_phone' => array('label' => t('Phone Numbers - US & Canada')),
-    'cr_phone' => array('label' => t('Phone Numbers - Costa Rica')),
-    'pa_phone' => array('label' => t('Phone Numbers - Panama')),
-    'gb_phone' => array('label' => t('Phone Numbers - Great Britain - United Kingdom')),
-    'ru_phone' => array('label' => t('Phone Numbers - Russia')),
-    'ua_phone' => array('label' => t('Phone Numbers - Ukraine - in Kiev')),    
-    'es_phone' => array('label' => t('Phone Numbers - Spain')),
-    'au_phone' => array('label' => t('Phone Numbers - Australia')),
-    'cs_phone' => array('label' => t('Phone Numbers - Czech Republic')),
-    'hu_phone' => array('label' => t('Phone Numbers - Hungary')),
-    'pl_phone' => array('label' => t('Phone Numbers - Poland - mobiles only')),    
-    'nl_phone' => array('label' => t('Phone Numbers - Netherland')),
-    'se_phone' => array('label' => t('Phone Numbers - Sweden')),
-    'za_phone' => array('label' => t('Phone Numbers - South Africa')),    
-    'il_phone' => array('label' => t('Phone Numbers - Israel')),
-    'nz_phone' => array('label' => t('Phone Numbers - New Zealand')),
-    'br_phone' => array('label' => t('Phone Numbers - Brazil')),
-    'cl_phone' => array('label' => t('Phone Numbers - Chile')),    
-    'cn_phone' => array('label' => t('Phone Numbers - China')),    
-    'hk_phone' => array('label' => t('Phone Numbers - Hong-Kong')),
-    'mo_phone' => array('label' => t('Phone Numbers - Macao')),
-    'ph_phone' => array('label' => t('Phone Numbers - The Philippines')),
-    'sg_phone' => array('label' => t('Phone Numbers - Singapore')),    
-    'jo_phone' => array('label' => t('Phone Numbers - Jordan')),
-    'eg_phone' => array('label' => t('Phone Numbers - Egypt')),
-    'pk_phone' => array('label' => t('Phone Numbers - Pakistan')),    
-    'int_phone'=> array('label' => t('Phone Numbers - International Phone Numbers per E.123'))
-   );
+    'phone' => array(
+      'label' => t('Phone Number'),
+      'instance_settings' => array(
+        'phone_country_code' => 0,
+        'phone_default_country_code' => '1',
+        'phone_int_max_length' => 15,
+        'ca_phone_separator' => '-',
+        'ca_phone_parentheses' => 1,
+      ),
+      'default_formatter' => 'phone',
+      'default_widget' => 'phone_textfield',
+    ),
+  );
 }
 
 /**
- * Implementation of hook_theme().
+ * Implements hook_field_is_empty().
  */
-function phone_theme() {
-  return array(
-    'phone_textfield' => array(
-      'arguments' => array('element' => NULL),
-    ),
-    'phone_formatter_default' => array(
-      'arguments' => array('element' => NULL),
-    ),
-  );
+function phone_field_is_empty($item, $field) {
+  return empty($item['value']);
 }
 
 /**
- * Implementation of hook_field_settings().
- *
- * Handle the settings for a field.
- *
- * @param $op
- *   The operation to be performed. Possible values:
- *   - "form": Display the field settings form.
- *   - "validate": Check the field settings form for errors.
- *   - "save": Declare which fields to save back to the database.
- *   - "database columns": Declare the columns that content.module should create
- *     and manage on behalf of the field. If the field module wishes to handle
- *     its own database storage, this should be omitted.
- *   - "filters": Declare the Views filters available for the field.
- *     (this is used in CCK's default Views tables definition)
- *     They always apply to the first column listed in the "database columns"
- *     array.
- * @param $field
- *   The field on which the operation is to be performed.
- * @return
- *   This varies depending on the operation.
- *   - "form": an array of form elements to add to
- *     the settings page.
- *   - "validate": no return value. Use form_set_error().
- *   - "save": an array of names of form elements to
- *     be saved in the database.
- *   - "database columns": an array keyed by column name, with arrays of column
- *     information as values. This column information must include "type", the
- *     MySQL data type of the column, and may also include a "sortable" parameter
- *     to indicate to views.module that the column contains ordered information.
- *     TODO: Details of other information that can be passed to the database layer can
- *     be found in the API for the Schema API.
- *   - "filters": an array of 'filters' definitions as expected by views.module
- *     (see Views Documentation).
- *     When providing several filters, it is recommended to use the 'name'
- *     attribute in order to let the user distinguish between them. If no 'name'
- *     is specified for a filter, the key of the filter will be used instead.
+ * Implements hook_field_settings_form().
  */
-function phone_field_settings($op, $field) {
-  switch ($op) {
-    case 'form':
-      $form = array();
-      $form['phone_country_code'] = array(
-        '#type' => 'checkbox',
-        '#title' => t('Add the country code if not filled by the user'),
-        '#default_value' => isset($field['phone_country_code']) ? $field['phone_country_code'] : '',
-      );
-      if ($field['type'] == 'int_phone') {
-        $form['phone_int_help'] = array(
-          '#type' => 'markup',
-          '#value' => t('International phone numbers are in the form +XX YYYYYYY where XX is a country code and YYYYYYY is the local number. This field type is based off of the <a href="http://www.itu.int/rec/T-REC-E.123/en">E.123 specification</a>.'),
-        );
-        $form['phone_default_country_code'] = array(
-          '#type' => 'textfield',
-          '#title' => t('Default country code to add to international numbers without one (omit + sign)'),
-          '#default_value' => isset($field['phone_default_country_code']) ? $field['phone_default_country_code'] : '1',
-        );
-        $form['phone_int_max_length'] = array(
-          '#type' => 'textfield',
-          '#title' => t('Maximum length of international numbers, according to the ITU this is 15'),
-          '#default_value' => isset($field['phone_int_max_length']) ? $field['phone_int_max_length'] : '15',
-        );
-      }
-      if ($field['type'] == 'ca_phone') {
-        $form['ca_phone_separator'] = array(
-          '#type' => 'textfield',
-          '#title' => t('Separator'),
-          '#default_value' => isset($field['ca_phone_separator']) ? $field['ca_phone_separator'] : '-',
-          '#size' => 2,
-        );
-        $form['ca_phone_parentheses'] = array(
-          '#type' => 'checkbox',
-          '#title' => t('Use parentheses around area code'),
-          '#default_value' => isset($field['ca_phone_parentheses']) ? $field['ca_phone_parentheses'] : 1,
-        );
-      }
-      return $form;
+function phone_field_settings_form($field, $instance, $has_data) {
+  $settings = $field['settings'];
+  
+  $form = array();
+  $form['country'] = array(
+    '#type' => 'select',
+    '#title' => t('Country'),
+    '#options' => phone_countries(),
+    '#default_value' => $settings['country'],
+    '#description' => t('Which country-specific rules should this field be validated against and formatted according to.'),
+    '#disabled' => $has_data,
+    '#required' => TRUE,
+  );
+  
+  return $form;
+}
 
-    case 'save':
-      $settings = array('phone_country_code');
-      if ($field['type'] == 'ca_phone') {
-        array_push($settings, 'ca_phone_separator', 'ca_phone_parentheses');
-      }
-      if ($field['type'] == 'int_phone') {
-        array_push($settings, 'phone_int_help', 'phone_default_country_code', 'phone_int_max_length');
-      }
-      return $settings;
-    case 'database columns':
-      if ($field['type'] == 'fr_phone'
-       || $field['type'] == 'be_phone'
-       || $field['type'] == 'it_phone'
-       || $field['type'] == 'el_phone'       
-       || $field['type'] == 'ch_phone'
-       || $field['type'] == 'ca_phone'
-       || $field['type'] == 'cr_phone'
-       || $field['type'] == 'pa_phone'
-       || $field['type'] == 'pa_phone'
-       || $field['type'] == 'gb_phone'
-       || $field['type'] == 'ru_phone'
-       || $field['type'] == 'ua_phone'
-       || $field['type'] == 'es_phone'
-       || $field['type'] == 'au_phone'
-       || $field['type'] == 'cs_phone'
-       || $field['type'] == 'hu_phone'
-       || $field['type'] == 'pl_phone'
-       || $field['type'] == 'nl_phone'
-       || $field['type'] == 'se_phone'
-       || $field['type'] == 'za_phone'
-       || $field['type'] == 'il_phone'
-       || $field['type'] == 'nz_phone'
-       || $field['type'] == 'br_phone'
-       || $field['type'] == 'cl_phone'
-       || $field['type'] == 'cl_phone'
-       || $field['type'] == 'hk_phone'
-       || $field['type'] == 'mo_phone'
-       || $field['type'] == 'ph_phone'
-       || $field['type'] == 'sg_phone'
-       || $field['type'] == 'jo_phone'
-       || $field['type'] == 'eg_phone'
-       || $field['type'] == 'pk_phone'
-       || $field['type'] == 'int_phone'
-       ) {
-      	$columns = array(
-        	'value' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
-      	);
-      }
-      return $columns;
+/**                                                                                                                                                   
+ * Implements hook_field_instance_settings_form().                                                                                                    
+ */                                                                                                                                                   
+function phone_field_instance_settings_form($field, $instance) { 
+  $settings = $instance['settings'];  
+  
+  $form['phone_country_code'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Add the country code if not filled by the user'),
+    '#default_value' => $settings['phone_country_code'],
+  );
+  
+  if ($field['settings']['country'] == 'int') {
+    $form['phone_int_help'] = array(
+      '#type' => 'markup',
+      '#value' => t('International phone numbers are in the form +XX YYYYYYY where XX is a country code and YYYYYYY is the local number. This field type is based off of the <a href="http://www.itu.int/rec/T-REC-E.123/en">E.123 specification</a>.'),
+    );
+    $form['phone_default_country_code'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Default country code to add to international numbers without one (omit + sign)'),
+      '#default_value' => $settings['phone_default_country_code'],
+    );
+    $form['phone_int_max_length'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Maximum length of international numbers, according to the ITU this is 15'),
+      '#default_value' => $settings['phone_int_max_length'],
+    );
   }
+  
+  if ($field['settings']['country'] == 'ca') {
+    $form['ca_phone_separator'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Separator'),
+      '#default_value' => $settings['ca_phone_separator'],
+      '#size' => 2,
+    );
+    $form['ca_phone_parentheses'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Use parentheses around area code'),
+      '#default_value' => $settings['ca_phone_parentheses'],
+    );
+  }
+                                                                                                                                                                                                                                                                                                                                                                                                         
+  return $form;                                                                                                                                       
 }
 
 /**
- * Implementation of hook_field().
- *
- * Define the behavior of a field type.
- *
- * @param $op
- *   What kind of action is being performed. Possible values:
- *   - "load": The node is about to be loaded from the database. This hook
- *     should be used to load the field.
- *   - "validate": The user has just finished editing the node and is
- *     trying to preview or submit it. This hook can be used to check or
- *     even modify the node. Errors should be set with form_set_error().
- *   - "presave": The user has just finished editing the node and the node has
- *     passed validation. This hook can be used to modify the node.
- *   - "insert": The node is being created (inserted in the database).
- *   - "update": The node is being updated.
- *   - "delete": The node is being deleted.
- * @param &$node
- *   The node the action is being performed on. This argument is passed by
- *   reference for performance only; do not modify it.
- * @param $field
- *   The field the action is being performed on.
- * @param &$node_field
- *   The contents of the field in this node. Changes to this variable will
- *   be saved back to the node object.
- * @return
- *   This varies depending on the operation.
- *   - The "load" operation should return an object containing extra values
- *     to be merged into the node object.
- *   - The "insert", "update", "delete", "validate", and "presave" operations
- *     have no return value.
+ * Implements hook_field_validate().
  *
- * In most cases, only "validate" operations is relevant ; the rest
- * have default implementations in content_field() that usually suffice.
  */
-function phone_field($op, &$node, $field, &$node_field, $teaser, $page) {
-  switch ($op) {
-    case 'validate': // corresponds to hook phone_widget validate in phone-5.x
-      foreach ($node_field as $delta => $item) {
-        if ($item['value'] != '') {
-          if ($field['type'] == 'fr_phone' && !valid_phone_number('fr', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid French phone number<br>French phone numbers should only contain numbers and spaces and be like 99 99 99 99 99', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'be_phone' && !valid_phone_number('be', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Belgian phone number<br>Belgian phone numbers should ...', array('%value' => $item['value'])));
-          }     
-          if ($field['type'] == 'it_phone' && !valid_phone_number('it', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Italian phone number<br>Italian phone numbers should only ...', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'el_phone' && !valid_phone_number('el', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Greek phone number<br>Greek phone numbers should only ...', array('%value' => $item['value'])));
-          }    
-          if ($field['type'] == 'ch_phone' && !valid_phone_number('ch', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Swiss phone number<br>Swiss phone numbers should only contain numbers and spaces and be like 099 999 99 99', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'ca_phone' && !valid_phone_number('ca', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid North American phone number<br>North American Phone numbers should only contain numbers and + and - and ( and ) and spaces and be like 999-999-9999. Please enter a valid ten-digit phone number with optional extension.', array('%value' => $item['value'])));
-          }
-	  if ($field['type'] == 'cr_phone' && !valid_phone_number('cr', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Costa Rican phone number!<br>Costa Rican phone numbers should contain only numbers and spaces be like 99 99 99 99 with an optional prefix of "+506" or "00506".', array('%value' => $item['value'])));
-          }
-	  if ($field['type'] == 'pa_phone' && !valid_phone_number('pa', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Panamanian phone number!<br>Panamanian phone numbers should contain only numbers, spaces and dashes be like 9999-999, 9999 999 or 9999999 with an optional prefix of "+507" or "00507".', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'gb_phone' && !valid_phone_number('gb', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid British phone number<br>British Phone numbers should .... ', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'ru_phone' && !valid_phone_number('ru', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Russian phone number<br>Russian Phone numbers should .... ', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'ua_phone' && !valid_phone_number('ua', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Ukrainian phone number<br>Ukrainian Phone numbers should .... ', array('%value' => $item['value'])));
-          }          
-          if ($field['type'] == 'es_phone' && !valid_phone_number('es', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Spanish phone number<br>Spanish phone numbers should only contains numbers and spaces and be like 999 999 999', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'au_phone' && !valid_phone_number('au', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Australian phone number<br>Australian phone numbers should contain only numbers with an optional prefix of "+61"', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'cs_phone' && !valid_phone_number('cs', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Czech phone number!<br>Czech phone numbers should contain only numbers and spaces be like 999 999 999 with an optional prefix of "+420" or "00420".', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'hu_phone' && !valid_phone_number('hu', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Hungarian phone number!<br>Hungarian phone numbers should contain only numbers and spaces be like 70 999 9999 with an optional prefix of "+36" or "06".', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'pl_phone' && !valid_phone_number('pl', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Polish phone number!<br>Polish phone numbers should ...', array('%value' => $item['value'])));
-          }          
-          if ($field['type'] == 'nl_phone' && !valid_phone_number('nl', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Dutch phone number!<br>Dutch phone numbers should contain only numbers and spaces and - and be like 099-9999999 with an optional prefix of "+31".', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'se_phone' && !valid_phone_number('se', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Swedish phone number!<br>Swedish phone numbers should ....', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'za_phone' && !valid_phone_number('za', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid South African phone number!<br>South African phone numbers should ....', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'il_phone' && !valid_phone_number('il', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Israeli phone number!<br>Israeli phone numbers should .....', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'nz_phone' && !valid_phone_number('nz', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid New Zealand phone number!<br>New Zealand phone numbers should contain only numbers, spaces, brackets and "-". They should look like 04 123 4567 or can optionally omit the leading 0 and have a prefix of "+64".', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'br_phone' && !valid_phone_number('br', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Brazilian phone number!<br>Brazilian phone numbers should contain only numbers and spaces and - and be like 099 9999-9999 or 99 9999-9999 with an optional prefix of "+55".', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'cl_phone' && !valid_phone_number('cl', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Chilian phone number!<br>Chilean phone numbers should ...', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'cn_phone' && !valid_phone_number('cn', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Chinese phone number!<br>Chinese phone numbers should ...', array('%value' => $item['value'])));
-          }          
-          if ($field['type'] == 'hk_phone' && !valid_phone_number('hk', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Hong Kong phone number!<br>Hong Kong phone numbers should contain only numbers and spaces and be like 9999 9999 with an optional prefix of "+852" or "852".', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'mo_phone' && !valid_phone_number('mo', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Macau phone number!<br>Macau phone numbers should contain only numbers and spaces and be like 9999 9999 with an optional prefix of "+853" or "853".', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'ph_phone' && !valid_phone_number('ph', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Philippine phone number!<br>Example of valid Philippine phone numbers: +63 (2) 123-4567 or +63 (2) 123-4567 loc. 123	or mobile +63 (919) 123-4567', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'sg_phone' && !valid_phone_number('sg', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Singaporean phone number!<br>Singaporean phone numbers should ....', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'jo_phone' && !valid_phone_number('jo', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Jordanian phone number!<br>Please check the spaces and dashes in your number ...', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'eg_phone' && !valid_phone_number('eg', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Egyptian phone number!<br>Egyptian hone numbers should have the format +20 (#[#]) 1234567[8], where the digts between ( ) is the area or network code, without a leading zero; and digits between [ ] are optional', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'pk_phone' && !valid_phone_number('pk', $item['value'])) {
-            form_set_error($field['field_name'], t('"%value" is not a valid Pakistanese phone number!<br>Pakistanese phone numbers should ...', array('%value' => $item['value'])));
-          }
-          if ($field['type'] == 'int_phone' && !valid_phone_number('int', $item['value'])) {
-            form_set_error($field['field_name'],t('"%value" is not a valid international phone number<br>International phone numbers should contain a country code prefixed by a plus sign followed by the local number.', array('%value' => $item['value'])));
-          }
-        }
-      }
-      break;
-
-    case 'presave': // corresponds to hook phone_widget 'process form values' in phone-5.x
-      foreach ($node_field as $delta => $item) {
-        //format the phone number
-        if ($item['value'] != '') {
-          if ($field['type'] == 'fr_phone') {
-            $node_field[$delta]['value'] = format_phone_number('fr', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'be_phone') {
-            $node_field[$delta]['value'] = format_phone_number('be', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'it_phone') {
-            $node_field[$delta]['value'] = format_phone_number('it', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'el_phone') {
-            $node_field[$delta]['value'] = format_phone_number('el', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'ch_phone') {
-            $node_field[$delta]['value'] = format_phone_number('ch', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'ca_phone') {
-            $node_field[$delta]['value'] = format_phone_number('ca', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'cr_phone') {
-            $node_field[$delta]['value'] = format_phone_number('cr', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'pa_phone') {
-            $node_field[$delta]['value'] = format_phone_number('pa', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'gb_phone') {
-            $node_field[$delta]['value'] = format_phone_number('gb', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'ru_phone') {
-            $node_field[$delta]['value'] = format_phone_number('ru', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'ua_phone') {
-            $node_field[$delta]['value'] = format_phone_number('ua', $node_field[$delta]['value'], $field);
-          }          
-          if ($field['type'] == 'es_phone') {
-            $node_field[$delta]['value'] = format_phone_number('es', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'au_phone') {
-            $node_field[$delta]['value'] = format_phone_number('au', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'cs_phone') {
-            $node_field[$delta]['value'] = format_phone_number('cs', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'hu_phone') {
-            $node_field[$delta]['value'] = format_phone_number('hu', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'pl_phone') {
-            $node_field[$delta]['value'] = format_phone_number('hu', $node_field[$delta]['value'], $field);
-          }          
-          if ($field['type'] == 'nl_phone') {
-            $node_field[$delta]['value'] = format_phone_number('nl', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'se_phone') {
-            $node_field[$delta]['value'] = format_phone_number('se', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'za_phone') {
-            $node_field[$delta]['value'] = format_phone_number('za', $node_field[$delta]['value'], $field);
-          }          
-          if ($field['type'] == 'il_phone') {
-            $node_field[$delta]['value'] = format_phone_number('il', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'nz_phone') {
-            $node_field[$delta]['value'] = format_phone_number('nz', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'br_phone') {
-            $node_field[$delta]['value'] = format_phone_number('br', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'cl_phone') {
-            $node_field[$delta]['value'] = format_phone_number('cl', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'cn_phone') {
-            $node_field[$delta]['value'] = format_phone_number('cn', $node_field[$delta]['value'], $field);
-          }          
-          if ($field['type'] == 'hk_phone') {
-            $node_field[$delta]['value'] = format_phone_number('hk', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'mo_phone') {
-            $node_field[$delta]['value'] = format_phone_number('mo', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'ph_phone') {
-            $node_field[$delta]['value'] = format_phone_number('ph', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'sg_phone') {
-            $node_field[$delta]['value'] = format_phone_number('sg', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'jo_phone') {
-            $node_field[$delta]['value'] = format_phone_number('jo', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'eg_phone') {
-            $node_field[$delta]['value'] = format_phone_number('eg', $node_field[$delta]['value'], $field);
-          }
-          if ($field['type'] == 'pk_phone') {
-            $node_field[$delta]['value'] = format_phone_number('pk', $node_field[$delta]['value'], $field);
-          }          
-          if ($field['type'] == 'int_phone') {
-            $node_field[$delta]['value'] = format_phone_number('int', $node_field[$delta]['value'], $field);
-          }
-        }
+function phone_field_validate($entity_type, $entity, $field, $instance, $langcode, $items, &$errors) {
+  foreach ($items as $delta => $item) {
+    if (isset($item['value']) && $item['value'] != '') {
+      $ccode = $field['settings']['country'];
+      $value = $item['value'];
+      if (!valid_phone_number($ccode, $value)) {
+        $country = phone_country_info($ccode);
+        $errors[$field['field_name']][$langcode][$delta][] = array(
+          'error' => t($country['error'], array('%value' => $value)),
+        );
       }
-      break;
+    }
   }
 }
 
 /**
- * Implementation of hook_field_view_item().
+ * Implements hook_field_presave().
  *
  */
-/*
-function phone_field_view_item($field, $node_field_item) {
-    $phonenumber = check_plain($node_field_item['value']);
-    return $phonenumber;
+function phone_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  $ccode = $field['settings']['country'];
+  if (phone_countries($ccode) !== NULL) {
+    foreach ($items as $delta => $item) {
+      if (isset($item['value'])) {
+        $items[$delta]['value'] = format_phone_number($ccode, $item['value'], $instance['settings']);
+      }
+    }
+  }
 }
-*/
 
 /**
- *Implementation of hook_field_formatter_info().
- *
- * The default behavior of formatters is that they will create
- * a theme for a single field value.
- *
- * Setting 'multiple values' to CONTENT_HANDLE_FIELD will create
- * a formatter that will receive all the values of a field so you
- * can, for instance, plot all the values on a map or in a graph.
- *
- * The 'view' operation (handled by the Content module) constructs the
- * $node in a way that you can use drupal_render() to display the
- * formatted output for an individual field.
- *
- * i.e. print drupal_render($node->field_foo);
- *
- * The code now supports both single value formatters, which theme an
- * individual item value as has been done in previous version of CCK,
- * and multiple value formatters, which theme all values for the field
- * in a single theme. The multiple value formatters could be used, for
- * instance, to plot field values on a single map or display them
- * in a graph. Single value formatters are the default, multiple value
- * formatters can be designated as such in formatter_info().
- *
- * The node array will look like:
- *
- *  'Single value' formatter:
- *   $node->content['field_foo'] = array(
- *     '#type' => 'content_field',
- *     '#title' => 'label'
- *     '#field_name' => 'field_name',
- *     '#node' => $node,
- *     'items' =>
- *       0 => array(
- *         '#theme' => $theme,
- *         '#field_name' => 'field_name',
- *         '#type_name' => $node->type,
- *         '#formatter' => $formatter_name,
- *         '#item' => $items[0],
- *       ),
- *       1 => array(
- *         '#theme' => $theme,
- *         '#field_name' => 'field_name',
- *         '#type_name' => $node->type,
- *         '#formatter' => $formatter_name,
- *         '#item' => $items[1],
- *       ),
- *     ),
- *   );
- *  'Multiple value' formatter:
- *   $node->content['field_foo'] = array(
- *     '#type' => 'content_field',
- *     '#title' => 'label'
- *     '#field_name' => 'field_name',
- *     '#node' => $node,
- *     'items' => array(
- *       '#theme' => $theme,
- *       '#field_name' => 'field_name',
- *       '#type_name' => $node->type,
- *       '#formatter' => $formatter_name,
- *       0 => array(
- *         '#item' => $items[0],
- *       ),
- *       1 => array(
- *         '#item' => $items[1],
- *       ),
- *     ),
- *   );
+ * Implements hook_field_formatter_info().
  */
-function phone_field_formatter_info() {
+function phone_field_formatter_info() {  
   return array(
-    'default' => array(
-      'label' => 'Default',
-      'field types' => array('fr_phone',
-      			'be_phone',
-      			'it_phone',
-      			'el_phone',      			
-      			'ch_phone',
-      			'ca_phone',
-    			'cr_phone',
-    			'pa_phone',
-      			'gb_phone',
-      			'ru_phone',
-      			'ua_phone',
-      			'es_phone',
-      			'au_phone',
-      			'cs_phone',
-      			'hu_phone',
-      			'pl_phone',
-      			'nl_phone',
-      			'se_phone',
-      			'za_phone',
-      			'il_phone',
-      			'nz_phone',
-      			'br_phone',
-      			'cl_phone',
-      			'cn_phone',      			
-      			'hk_phone',
-      			'mo_phone',
-      			'ph_phone',
-      			'sg_phone',
-      			'jo_phone',
-      			'eg_phone',
-      			'pk_phone',
-      			'int_phone'
-      			),
-      'multiple values' => CONTENT_HANDLE_CORE,
-    ),
+    'phone' => array(
+      'label' => t('Default'),
+      'field types' => 'phone',
+    )
   );
- }
+}
 
 /**
- * Implementation of hook_field_formatter().
- *
- * Prepare an individual item for viewing in a browser.
- *
- * @param $field
- *   The field the action is being performed on.
- * @param $item
- *   An array, keyed by column, of the data stored for this item in this field.
- * @param $formatter
- *   The name of the formatter being used to display the field.
- * @param $node
- *   The node object, for context. Will be NULL in some cases.
- *   Warning: when displaying field retrieved by Views, $node will not
- *   be a "full-fledged" node object, but an object containg the data returned
- *   by the Views query (at least nid, vid, changed)
- * @return
- *   An HTML string containing the formatted item.
- *
- * In a multiple-value field scenario, this function will be called once per
- * value currently stored in the field. This function is also used as the handler
- * for viewing a field in a views.module tabular listing.
- *
- * It is important that this function at the minimum perform security
- * transformations such as running check_plain() or check_markup().
+ * Implements hook_field_formatter_view().
  */
-function phone_field_formatter($field, $item, $formatter, $node) {
-  if (!isset($item['value'])) {
-    return '';
-  }
-  if ($field['text_processing']) {
-    $text = check_markup($item['value'], $item['format'], is_null($node) || isset($node->in_preview));
-  }
-  else {
-    $text = check_plain($item['value']);
-  }
-  // iPhone Support
-  if (strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== FALSE) {
-     $text = '<a href="tel:' . $text . '">' . $text . '</a>';
+function phone_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
+  $element = array();
+  foreach ($items as $delta => $item) {
+    $text = '';
+    
+    if (isset($item['value'])) {
+      $text = check_plain($item['value']);
+      // iPhone Support
+      if (strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== FALSE) {
+         $text = '<a href="tel:' . $text . '">' . $text . '</a>';
+      }
+    }
+    $element[$delta]['#markup'] = $text;
   }
-  return $text;
+  return $element;
 }
 
 /**
- * Implementation of hook_widget_info().
- *
- * Here we indicate that the content module will handle
- * the default value and multiple values for these widgets.
- *
- * Callbacks can be omitted if default handing is used.
- * They're included here just so this module can be used
- * as an example for custom modules that might do things
- * differently.
- *
- * IMPORTANT! - field and widget names will be truncated to 32 characters in
- * the database and in internal arrays, like content_fields().
+ * Implements hook_field_widget_info().
  */
-function phone_widget_info() {
+function phone_field_widget_info() {
   return array(
     'phone_textfield' => array(
-      'label' => t('Textfield'),
-      'field types' => array('fr_phone',
-      			'be_phone',
-      			'it_phone',
-      			'el_phone',      			
-      			'ch_phone',
-      			'ca_phone',
-    			'cr_phone',
-    			'pa_phone',
-      			'gb_phone',
-      			'ru_phone',
-      			'ua_phone',
-      			'es_phone',
-      			'au_phone',
-      			'cs_phone',
-      			'hu_phone',
-      			'pl_phone',
-      			'nl_phone',
-      			'se_phone',
-      			'za_phone',
-      			'il_phone',
-      			'nz_phone',
-      			'br_phone',
-      			'cl_phone',
-      			'cn_phone',      			
-      			'hk_phone',
-       			'mo_phone',
-       			'ph_phone',
-       			'sg_phone',
-       			'jo_phone',
-       			'eg_phone',
-       			'pk_phone',
-      			'int_phone'
-      			),
-      'multiple values' => CONTENT_HANDLE_CORE,
-      'callbacks' => array(
-      'default value' => CONTENT_CALLBACK_DEFAULT,
-      ),
+      'label' => t('Text field'),
+      'field types' => array('phone'),
     ),
   );
 }
 
 /**
- * Implementation of hook_widget_settings().
- *
- * Handle the parameters for a widget.
- *
- * @param $op
- *   The operation to be performed. Possible values:
- *   - "form": Display the widget settings form.
- *   - "validate": Check the widget settings form for errors.
- *   - "save": Declare which pieces of information to save back to the database.
- * @param $widget
- *   The widget on which the operation is to be performed.
- * @return
- *   This varies depending on the operation.
- *   - "form": an array of form elements to add to the settings page.
- *   - "validate": no return value. Use form_set_error().
- *   - "save": an array of names of form elements to be saved in the database.
- */
-function phone_widget_settings($op, $widget) {
-  switch ($op) {
-    case 'form':    
-      $form = array();
-      $size = (isset($widget['size']) && is_numeric($widget['size'])) ? $widget['size'] : 60;
-      $form['input']['size'] = array(
-        '#type' => 'textfield',
-        '#title' => t('Size of textfield'),
-        '#default_value' => $size,
-        '#element_validate' => array('_element_validate_integer_positive'),
-        '#required' => TRUE,
-      );
-      return $form;
-    
-    case 'validate':
-      break; //do nothing
-
-    case 'save':
-      return array('size');
-  }
-}
-
-/**
- * Implementation of hook_widget().
- *
- * Attach a single form element to the form. It will be built out and
- * validated in the callback(s) listed in hook_elements. We build it
- * out in the callbacks rather than here in hook_widget so it can be
- * plugged into any module that can provide it with valid
- * $field information.
- *
- * Content module will set the weight, field name and delta values
- * for each form element. This is a change from earlier CCK versions
- * where the widget managed its own multiple values.
- *
- * If there are multiple values for this field, the content module will
- * call this function as many times as needed.
- *
- * @param $form
- *   the entire form array, $form['#node'] holds node information
- * @param $form_state
- *   the form_state, $form_state['values'][$field['field_name']]
- *   holds the field's form values.
- * @param $field
- *   the field array
- * @param $items
- *   array of default values for this field
- * @param $delta
- *   the order of this item in the array of subelements (0, 1, 2, etc)
- *
- * @return
- *   the form item for a single element for this field
+ * Implements hook_field_widget_form().
  */
-function phone_widget(&$form, &$form_state, $field, $items, $delta = 0) {
-  $element = array(
-    '#type' => $field['widget']['type'],
-    '#default_value' => isset($items[$delta]) ? $items[$delta] : NULL,
+function phone_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
+  $element['value'] = array(
+    '#type' => 'textfield',
+    '#title' => $element['#title'],
+    '#default_value' => isset($items[$delta]['value']) ? $items[$delta]['value'] : '',
+    '#size' => 17,
+    '#maxlength' => (
+      $field['settings']['country'] == 'int' ? 
+        (isset($instance['settings']['phone_int_max_length']) ? $instance['settings']['phone_int_max_length'] : NULL)
+        : NULL
+    ),
   );
   return $element;
 }
 
-
-
+////////////////////////////////////////////
+/// Other hook implementationa
+////////////////////////////////////////////
 
 /**
- * Implementation of hook_content_is_empty().
- *
- * NEW REQUIRED HOOK!
- *
- * This function tells the content module whether or not to consider
- * the $item to be empty. This is used by the content module
- * to remove empty, non-required values before saving them.
+ * Implements hook_content_migrate_field_alter().
+ * 
+ * Use this to tweak the conversion of field settings
+ * from the D6 style to the D7 style for specific
+ * situations not handled by basic conversion,
+ * as when field types or settings are changed.
  */
-function phone_content_is_empty($item, $field) {
-  if (empty($item['value'])) {
-    return TRUE;
-  }
-  return FALSE;
+function phone_content_migrate_field_alter(&$field_value, $instance_value) {
+  module_load_include('inc', 'phone', 'phone.migrate');
+  phone_field_alter($field_value, $instance_value);
 }
 
 /**
- * Implementation of FAPI hook_elements().
- *
- * Any FAPI callbacks needed for individual widgets can be declared here,
- * and the element will be passed to those callbacks for processing.
- *
- * Drupal will automatically theme the element using a theme with
- * the same name as the hook_elements key.
- *
- * Autocomplete_path is not used by text_widget but other widgets can use it
- * (see nodereference and userreference).
- */
- function phone_elements() {
-  return array(
-    'phone_textfield' => array(
-      '#input' => TRUE,
-      '#columns' => array('value'), '#delta' => 0,
-      '#process' => array('phone_textfield_process'),
-      '#autocomplete_path' => FALSE,
-      ),
-  );
-}
-
-/**
- * FAPI theme for an individual text elements.
- *
- * The textfield or textarea is already rendered by the
- * textfield or textarea themes and the html output
- * lives in $element['#children']. Override this theme to
- * make custom changes to the output.
- *
- * $element['#field_name'] contains the field name
- * $element['#delta]  is the position of this element in the group
- */
-function theme_phone_textfield($element) {
-  drupal_add_css(drupal_get_path('module', 'phone') .'/theme/phone.css');
-  return $element['#children'];
+* Implementation of hook token_list
+*/
+function phone_token_list($type = 'all') {
+  if ($type == 'field' || $type == 'all') {
+    $tokens['phone']['raw']       = t('Raw phone numbers');
+    $tokens['phone']['formatted'] = t('Formatted phone numbers');
+    return $tokens;
+  }
 }
 
 /**
- * Process an individual element.
- *
- * Build the form element. When creating a form using FAPI #process,
- * note that $element['#value'] is already set.
- *
- * The $fields array is in $form['#field_info'][$element['#field_name']].
- */
-function phone_textfield_process($element, $edit, $form_state, $form) {
-  $field = $form['#field_info'][$element['#field_name']];
-  $field_key = $element['#columns'][0];
-  $delta = $element['#delta'];
-  $element[$field_key] = array(
-    '#type' => 'textfield',
-    '#default_value' => isset($element['#value'][$field_key]) ? $element['#value'][$field_key] : NULL,
-    '#size' => !empty($field['widget']['size']) ? $field['widget']['size'] : 60,    
-    '#autocomplete_path' => FALSE,
-    // The following values were set by the content module and need
-    // to be passed down to the nested element.
-    '#title' => $element['#title'],
-    '#description' => $element['#description'],
-    '#required' => $element['#required'],
-    '#field_name' => $element['#field_name'],
-    '#type_name' => $element['#type_name'],
-    '#delta' => $element['#delta'],
-    '#columns' => $element['#columns'],
-    '#attributes' => array('class' => 'phone-field-textfield'),
-    '#size' => 17,
-    '#maxlength' => 20, // International standard is 16 - allow for the plus sign and 15 digits plus separators - set to 20 to accomodate numbers with extensions    
-  );
-
-  if (!empty($field['max_length'])) { // TODO Appears to be a non-existent property name.
-    $element[$field_key]['#maxlength'] = $field['max_length'];
-  }
-  if (!empty($field['text_processing'])) {
-    $filter_key = $element['#columns'][1];
-    $format = isset($element['#value'][$filter_key]) ? $element['#value'][$filter_key] : FILTER_FORMAT_DEFAULT;
-    $parents = array_merge($element['#parents'] , array($filter_key));
-    $element[$filter_key] = filter_form($format, 1, $parents);
+* Implementation of hook token_values
+*/
+function phone_token_values($type, $object = NULL, $options = array()) {
+  if ($type == 'field') {
+    $item = $object[0];
+    $tokens['raw']       = $item['value'];
+    $tokens['formatted'] = $item['view'];
+    return $tokens;
   }
-
-  // Used so that hook_field('validate') knows where to flag an error.
-  $element['_error_element'] = array(
-    '#type' => 'value',
-    '#value' => implode('][', array_merge($element['#parents'], array($field_key))),
-  );
-
-  return $element;
 }
 
 /**
- * Theme function for 'default' text field formatter.
+ * Implementation of hook_simpletest().
  */
-function theme_phone_formatter_default($element) {
-  return $element['#item']['value'];
+function phone_simpletest() {
+  $dir = drupal_get_path('module', 'phone'). '/tests';
+  $tests = file_scan_directory($dir, '\.test$');
+  return array_keys($tests);
 }
 
+////////////////////////////////////////////
+/// Modules private functions
+////////////////////////////////////////////
 
 /**
  * Country supported or not by the module ?
@@ -878,45 +304,32 @@ function theme_phone_formatter_default($element) {
  * @return boolean Returns a boolean containting the answer to the question.
  */
 function phone_supported_countrycode($countrycode) {
-  if ($countrycode == 'fr'
-  	|| $countrycode == 'be'
-  	|| $countrycode == 'it'
-  	|| $countrycode == 'el'  	
-  	|| $countrycode == 'ch'
-  	|| $countrycode == 'ca'
-  	|| $countrycode == 'cr'
-  	|| $countrycode == 'pa'
-  	|| $countrycode == 'gb'
-  	|| $countrycode == 'ru'
-  	|| $countrycode == 'ua'
-  	|| $countrycode == 'es'
-  	|| $countrycode == 'au'
-  	|| $countrycode == 'cs'
-  	|| $countrycode == 'hu'
-  	|| $countrycode == 'pl'
-  	|| $countrycode == 'nl'
-  	|| $countrycode == 'se'
-  	|| $countrycode == 'za'
-  	|| $countrycode == 'il'
-  	|| $countrycode == 'nz'
-  	|| $countrycode == 'br'
-  	|| $countrycode == 'cl'
-  	|| $countrycode == 'cn'  	
-  	|| $countrycode == 'hk'
-  	|| $countrycode == 'mo'
-  	|| $countrycode == 'ph'
-  	|| $countrycode == 'sg'
-  	|| $countrycode == 'jo'
-  	|| $countrycode == 'eg'
-  	|| $countrycode == 'pk'
-  	|| $countrycode == 'int'
-  	) {
-        return TRUE;
-  }
-  else {
-  	//Country not taken into account yet
-  	return FALSE;
+  return (phone_country_info($countrycode) !== NULL ? TRUE : FALSE);
+}
+
+
+/**
+ * Get a country meta info
+ *
+ * @param string $countrycode
+ * @return array Returns a array containing country metadata
+ */
+
+function phone_country_info($countrycode = NULL) {
+  static $i;
+  
+  $countrycode = trim($countrycode);
+  
+  if (phone_countries($countrycode) !== FALSE) {
+    $phone_info_function = 'phone_'. $countrycode . '_metadata';
+  	module_load_include('inc', 'phone', 'include/phone.'. $countrycode);
+  	
+    if (function_exists($phone_info_function)) {
+      return $phone_info_function();
+    }
   }
+  //Country not taken into account yet
+  return FALSE;
 }
 
 /**
@@ -932,26 +345,19 @@ function valid_phone_number($countrycode, $phonenumber) {
   $phonenumber = trim($phonenumber);
 
   if (phone_supported_countrycode($countrycode)) {
-        //drupal_set_message('langue = ' . $countrycode, 'error');
-
   	$valid_phone_function = 'valid_'. $countrycode . '_phone_number';
-  	module_load_include('inc', 'phone', 'phone.'. $countrycode);
-
-	if (function_exists($valid_phone_function)) {
-	    return $valid_phone_function($phonenumber);
-	}
-	else  {
-	    return FALSE;
-	}
-  }
-  else {
-  	//Country not taken into account yet
-  	return FALSE;
+  	module_load_include('inc', 'phone', 'include/phone.'. $countrycode);
+
+    if (function_exists($valid_phone_function)) {
+       return $valid_phone_function($phonenumber);
+    }
   }
+  //Country not taken into account yet
+  return FALSE;
 }
 
 /**
- * Verification for Phone Numbers.
+ * Formatting for Phone Numbers.
  *
  * @param string $countrycode
  * @param string $phonenumber
@@ -963,52 +369,14 @@ function format_phone_number($countrycode, $phonenumber, $field) {
   $phonenumber = trim($phonenumber);
 
   if (phone_supported_countrycode($countrycode)) {
-        //drupal_set_message('langue = ' . $countrycode, 'error');
-
   	$format_phone_function = 'format_'. $countrycode . '_phone_number';
-  	module_load_include('inc', 'phone', 'phone.'. $countrycode);
-
-	if (function_exists($format_phone_function)) {
-	    return $format_phone_function($phonenumber, $field);
-	}
-	else {
-	    return FALSE;
-	}
-  }
-  else {
-  	//Country not taken into account yet
-  	return FALSE;
-  }
-}
-
-/**
-* Implementation of hook token_list
-*/
-function phone_token_list($type = 'all') {
-  if ($type == 'field' || $type == 'all') {
-    $tokens['phone']['raw']       = t('Raw phone numbers');
-    $tokens['phone']['formatted'] = t('Formatted phone numbers');
-    return $tokens;
-  }
-}
+  	module_load_include('inc', 'phone', 'include/phone.'. $countrycode);
 
-/**
-* Implementation of hook token_values
-*/
-function phone_token_values($type, $object = NULL, $options = array()) {
-  if ($type == 'field') {
-    $item = $object[0];
-    $tokens['raw']       = $item['value'];
-    $tokens['formatted'] = $item['view'];
-    return $tokens;
+    if (function_exists($format_phone_function)) {
+      return $format_phone_function($phonenumber, $field);
+    }
   }
+  //Country not taken into account yet
+  return FALSE;
 }
 
-/**
- * Implementation of hook_simpletest().
- */
-function phone_simpletest() {
-  $dir = drupal_get_path('module', 'phone'). '/tests';
-  $tests = file_scan_directory($dir, '\.test$');
-  return array_keys($tests);
-}
diff --git phone.nl.inc phone.nl.inc
deleted file mode 100644
index f323d96..0000000
--- phone.nl.inc
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Dutch phone numbers.
- */
-
-function phone_nl_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Netherland',
-    'error' => '"%value" is not a valid Dutch phone number!<br>Dutch phone numbers should contain only numbers and spaces and - and be like 099-9999999 with an optional prefix of "+31".',
-  );
-}
-
- /**
- * Verifies that $phonenumber is a valid ten-digit Dutch phone number with spaces and -
- *
- * Regular expression adapted from Nico Lubbers's regex at RegExLib.com
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_nl_phone_number($phonenumber) {
-
-  //$phonenumber = trim($phonenumber);
-
-  /*
-    Accepts:
-    	06-12345678
-    	06 123 456 78
-    	010-1234567
-    	020 123 4567
-    	0221-123456
-    	0221 123 456
-    Rejects:
-    	05-12345678
-    	123-4567890
-    	123 456 7890
-  */
-
-  // define regular expression
-  $regex = '/
-  ([0]{1}[6]{1}[-\s]+[1-9]{1}[\s]*([0-9]{1}[\s]*){7})				# Mobile phonenumber
-  |
-  ([0]{1}[1-9]{1}[0-9]{2}[-\s]+[1-9]{1}[\s]*([0-9]{1}[\s]*){5})		# Phonenumber with 4 digit area code
-  |
-  ([0]{1}[1-9]{1}[0-9]{1}[-\s]+[1-9]{1}[\s]*([0-9]{1}[\s]*){6})		# Phonenumber with 3 digit area code
-  /x';
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Dutch Phone Numbers into standard area-phonenumber or with extra country code +31 international format
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_nl_phone_number($phonenumber, $field) {
-
-  $areacode = $localnumber = '';
-  // Mobile number
-  if (preg_match('/([0]{1}[6]{1}[-\s]+[1-9]{1}[\s]*([0-9]{1}[\s]*){7})/', $phonenumber)) {
-        preg_match('/([0]{1}[6]{1})[-\s]+([1-9]{1}[\s]*([0-9]{1}[\s]*){7})/', $phonenumber, $matches);
-    }
-  // Phonenumber with 4 digit area code
-  if (preg_match('/([0]{1}[1-9]{1}[0-9]{2}[-\s]+[1-9]{1}[\s]*([0-9]{1}[\s]*){5})/', $phonenumber)) {
-      preg_match('/([0]{1}[1-9]{1}[0-9]{2})[-\s]+([1-9]{1}[\s]*([0-9]{1}[\s]*){5})/', $phonenumber, $matches);
-  }
-  // Phonenumber with 3 digit area code
-  if (preg_match('/([0]{1}[1-9]{1}[0-9]{1}[-\s]+[1-9]{1}[\s]*([0-9]{1}[\s]*){6})/', $phonenumber)) {
-      preg_match('/([0]{1}[1-9]{1}[0-9]{1})[-\s]+([1-9]{1}[\s]*([0-9]{1}[\s]*){6})/', $phonenumber, $matches);
-  }
-
-  $areacode = $matches[1];
-  $localnumber = preg_replace('/ /', '', $matches[2]);
-  $phonenumber = $areacode. '-'. $localnumber;
-
-  // Add Country code if needed
-  if ($field['phone_country_code']) {
-      $areacode = preg_replace('/^0/', '', $areacode);
-      $phonenumber = '+31-'. $areacode. '-'. $localnumber;
-  }
-
-  return $phonenumber;
-}
diff --git phone.nz.inc phone.nz.inc
deleted file mode 100644
index e1f3d62..0000000
--- phone.nz.inc
+++ /dev/null
@@ -1,225 +0,0 @@
-<?php
-
-
-/**
- * @file
- * CCK Field for New Zealand phone numbers.
- */
-
-function phone_nz_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - New Zealand ',
-    'error' => '"%value" is not a valid New Zealand phone number!<br>New Zealand phone numbers should contain only numbers, spaces, brackets and "-". They should look like 04 123 4567 or can optionally omit the leading 0 and have a prefix of "+64".',
-  );
-}
-
-/**
- * Verification for New Zealand Phone Numbers.
- * As supplied by http://www.itu.int/itudoc/itu-t/number/n/nzl/76195_ww9.doc, April 2009
- *
- * @param string $phonenumber
- * @return boolean returns boolean FALSE if the phone number is not valid.
- */
-function valid_nz_phone_number($phonenumber) {
-
-  //$phonenumber = trim($phonenumber);
-
-  // strip formatting chars
-  $phonenumber = preg_replace('/[\-() ]/', '', $phonenumber);
-  // strip optional '+64' or '0' prefixes
-  $phonenumber = preg_replace('/^(\+64|0)/', '', $phonenumber);
-
-  //$rules[] = array("Prefix","Minimum length","Maximum length");
-
-  // special purpose service codes and numbers
-  /*// Enable if required
-  $rules[] = array('10', 3, 3);
-  $rules[] = array('12', 6, 7); // NZ Direct Service
-  $rules[] = array('60', 4, 4); // Directory Assistance (operator only) - Maybe shouldn't be in here
-  $rules[] = array('83', 5, 8); // "Enhanced Voice Services"
-  $rules[] = array('86', 8, 8); // "Enhanced Paging Services"
-  $rules[] = array('87', 4, 8); // "PSTN access to data services"
-  */
-
-  // Mobile
-  $rules[] = array('20', 9, 9); // mobile radio / Orcon mobile
-
-  $rules[] = array('22', 8, 10); // NZ Communications (actual lengths subject to change)
-
-  $rules[] = array('210', 8, 10); // Vodafone
-  $rules[] = array('211', 8, 9);  // Vodafone
-  $rules[] = array('212', 8, 9);  // Vodafone
-  $rules[] = array('213', 8, 9);  // Vodafone
-  $rules[] = array('214', 8, 9);  // Vodafone
-  $rules[] = array('215', 8, 9);  // Vodafone
-  $rules[] = array('216', 8, 9);  // Vodafone
-  $rules[] = array('217', 8, 9);  // Vodafone
-  $rules[] = array('218', 8, 9);  // Vodafone
-  $rules[] = array('219', 8, 9);  // Vodafone
-
-  $rules[] = array('24', 8, 8); // Scott Base
-  //$rules[] = array('25', 8, 9); // Old Telecom 025, now unused
-  $rules[] = array('26', 8, 9); // Telecom Paging
-  $rules[] = array('27', 9, 9); // Telecom 027 mobile
-  $rules[] = array('29', 8, 9); // TelstraClear mobile
-
-  // South Island regional
-  $rules[] = array('32', 8, 8);
-  $rules[] = array('33', 8, 8);
-  $rules[] = array('34', 8, 8);
-  $rules[] = array('35', 8, 8);
-  $rules[] = array('36', 8, 8);
-  $rules[] = array('37', 8, 8);
-  $rules[] = array('39', 8, 8);
-
-  // Wellington regional
-  $rules[] = array('42', 8, 8);
-  $rules[] = array('43', 8, 8);
-  $rules[] = array('44', 8, 8);
-  $rules[] = array('45', 8, 8);
-  $rules[] = array('46', 8, 8);
-  $rules[] = array('48', 8, 8);
-  $rules[] = array('49', 8, 8);
-
-  // Manawatu, Taranaki, Hawkes Bay, Gisborne, Wairarapa, Otaki regional
-  $rules[] = array('62', 8, 8);
-  $rules[] = array('63', 8, 8);
-  $rules[] = array('67', 8, 8);
-  $rules[] = array('68', 8, 8);
-  $rules[] = array('69', 8, 8);
-
-  // Waikato, BOP, Taumarunui regional
-  $rules[] = array('73', 8, 8);
-  $rules[] = array('75', 8, 8);
-  $rules[] = array('62', 8, 8);
-  $rules[] = array('78', 8, 8);
-  $rules[] = array('79', 8, 8);
-
-  // Freecall
-  $rules[] = array('80', 8, 10);
-
-  // Pay-call
-  $rules[] = array('90', 8, 10);
-
-  // Auckland + Northland regional
-  $rules[] = array('92', 8, 8);
-  $rules[] = array('93', 8, 8);
-  $rules[] = array('94', 8, 8);
-  $rules[] = array('95', 8, 8);
-  $rules[] = array('96', 8, 8);
-  $rules[] = array('98', 8, 8);
-  $rules[] = array('99', 8, 8);
-
-  foreach ($rules as $rule) {
-    if (preg_match('/^'.$rule[0].'/', $phonenumber) && strlen($phonenumber) >= $rule[1] && strlen($phonenumber) <= $rule[2]) {
-      return true;
-    }
-  }
-  return false;
-}
-
-/**
- * Formatting for New Zealand Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containing the phone number with some formatting.
- */
-function format_nz_phone_number($phonenumber, $field) {
-  $prefix = '';
-  $extension = '';
-  // strip old formatting chars
-  $phonenumber = preg_replace('/[\-() ]/', '', $phonenumber);
-
-  /*
-   * strip and save the +64 prefix if found
-   */
-  if (preg_match('/^\+64/', $phonenumber, $match)) {
-    $prefix = '+64';
-    $phonenumber = str_replace('+64', '', $phonenumber);
-  }
-  else {
-    $prefix = '0';
-
-    /*
-     * Remove a leading 0, if present
-     */
-    if (preg_match('/^0/', $phonenumber, $match)) {
-      $phonenumber = substr($phonenumber, 1);
-    }
-  }
-
-  /*
-   * strip and save the extension (x9999) postfix if found
-   */
-  if (preg_match('/(x[0-9]+)$/', $phonenumber, $match)) {
-    $extension = ' '.$match[1];
-    $phonenumber = preg_replace('/x[0-9]+$/', '', $phonenumber);
-  }
-
-  /*
-   * geographic numbers
-   * Eg. (04) 123 4578
-   */
-  if (preg_match('/^([34679])([0-9]{3})([0-9]{4})$/', $phonenumber, $match)) {
-    return _format_nz_phone_number_prefix($prefix, $match[1]) . $match[2] . ' ' . $match[3] . $extension;
-  }
-
-  /*
-   * 8 digit mobile numbers
-   * Eg. 021 123 123
-   */
-  if (preg_match('/^(2[12679])([0-9]{3})([0-9]{3})$/', $phonenumber, $match)) {
-    return _format_nz_phone_number_prefix($prefix, $match[1]) . $match[2] . ' ' . $match[3] . $extension;
-  }
-
-  /*
-   * 9 digit mobile numbers
-   * Eg. 021 123 4567
-   */
-  if (preg_match('/^(2[12679])([0-9]{3})([0-9]{4})$/', $phonenumber, $match)) {
-    return _format_nz_phone_number_prefix($prefix, $match[1]) . $match[2] . ' ' . $match[3] . $extension;
-  }
-
-  /*
-   * 10 digit mobile numbers
-   * Eg. 021 1234 1234
-   */
-  if (preg_match('/^(2[12679])([0-9]{4})([0-9]{4})$/', $phonenumber, $match)) {
-    return _format_nz_phone_number_prefix($prefix, $match[1]) . $match[2] . ' ' . $match[3] . $extension;
-  }
-
-  /**
-   * 0800/0900 numbers (a bit random)
-  */
-  if (preg_match('/^(900|800)(\d+)$/', $phonenumber, $match)) {
-    // How we format depends on the length
-    $formatted = null;
-    switch(strlen($match[2])) {
-      case 5: $formatted = preg_replace('/^(\d{2})(\d{3})$/', '$1$2', $match[2]); break;
-      case 6: $formatted = preg_replace('/^(\d{3})(\d{3})$/', '$1$2', $match[2]); break;
-      case 7: $formatted = preg_replace('/^(\d{3})(\d{4})$/', '$1 $2', $match[2]); break;
-    }
-    return _format_nz_phone_number_prefix($prefix, $match[1]).$formatted;
-  }
-
-  // default (probably bad)
-  return $prefix . $phonenumber . $extension;
-}
-
-/**
- * Formats the prefix as either +64 4 or (04), depending on the original prefix context
- *
- * @param string $prefix either '+64' or '0'
- * @param string  $area_code the area code, eg. 4, 21, 27 etc
- * @return string the formatted prefix
- */
-function _format_nz_phone_number_prefix($prefix, $area_code) {
-  $area_code = intval($area_code);
-  if (in_array($area_code, array('800', '900'))) {
-    return ($prefix == '0') ? $prefix.$area_code.' ' : $prefix.' '.$area_code.' ';
-  }
-  else {
-    return ($prefix == '0') ? '('.$prefix.$area_code.') ' : $prefix.' '.$area_code.' ';
-  }
-}
diff --git phone.pa.inc phone.pa.inc
deleted file mode 100644
index 9bf142f..0000000
--- phone.pa.inc
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK field for Panamanian phone numbers
- */
-/*
- * ((00|\+)?[0-9]{3}[\s])?  #First group    00507 or +507 (plus space)
- * ([0-9]{3,4})       #Second group three or four numbers (four for cellphones)
- * [\s|-]? space or dash
- * ([0-9]{4})  #Third group
- *
- * Accepted:
- *  00507 2603133
- *  +507 260-4343
- *  260 3133
- *  260-3133
- *
- *  Cellphones
- *  +507 6545-4345
- *  6545-4345
- *  6545 4345
- *  65454345
- */
-define('PHONE_PA_REGEX', '/((00|\+)?[0-9]{3}[\s])?([0-9]{3,4})[\s|-]?([0-9]{4})/');
-
-function phone_pa_metadata() {
-   // These strings are translated using t() on output.
-   return array(
-     'label' => 'Phone Numbers - Panama',
-     'error' => '"%value" is not a valid Panamanian phone number!<br>Panamanian phone numbers should contain only numbers, spaces and dashes be like 9999-999, 9999 999 or 9999999 with an optional prefix of "+507" or "00507".',
-   );
- }
-
-/**
- * Verifies that $phonenumber is a valid nine-digit Panamanian phone number
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_pa_phone_number($phonenumber) {
-
-  //$phonenumber = trim($phonenumber);
-
-  // define regular expression
-  // return true if valid, false otherwise
-  return (bool) preg_match(PHONE_PA_REGEX, $phonenumber);
-}
-
-/**
- * Convert a valid Panamenian phone number into standard (+507) 260-4324 format
- *
- * @param $phonenumber must be a valid nine-digit number (with optional international prefix)
- *
- */
-function format_pa_phone_number($phonenumber, $field = FALSE) {
-  // get digits of phone number
-  preg_match(PHONE_PA_REGEX, $phonenumber, $matches);
-  if (preg_match(PHONE_PA_REGEX, $phonenumber, $matches) != 1) {
-    return $phonenumber; // not a Panamanian phone number
-  }
-  $phonenumber = $matches[3] . '-' . $matches[4];
-  if (trim($matches[1]) != '') {
-    $phonenumber = '+' . substr($matches[1], -4) . $phonenumber;
-  }
-  elseif ($field && isset($field['phone_country_code'])) {
-    $phonenumber = '+507 ' . $phonenumber;
-  }
-
-  return $phonenumber;
-}
diff --git phone.ph.inc phone.ph.inc
deleted file mode 100644
index fa13d7b..0000000
--- phone.ph.inc
+++ /dev/null
@@ -1,128 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Philippine phone numbers.
- */
-
- function phone_ph_metadata() {
-   // These strings are translated using t() on output.
-   return array(
-     'label' => 'Phone Numbers - The Philippines',
-     'error' => '"%value" is not a valid Philippine phone number<br />Example of valid Philippine phone numbers: +63 (2) 123-4567 or +63 (2) 123-4567 loc. 123	or mobile +63 (919) 123-4567',
-   );
- }
-
-/**
- * Verifies that $phonenumber is a valid ten-digit Philippine phone number
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-
-function valid_ph_phone_number($phonenumber) {
-
-  /*
-    Accepts:
-        +63197071234567
-				+63197071234567
-        +63(19707) 1234567
-				+63(19707) 123-4567
-        +63 19707 123 4567
-        +63 19707 123-4567
-        (19707) 1234567 loc. 1234
-  */
-  $regex = "/
-    (
-        (^\+63\s?\(?\d{5}\)?|^\(?\d{5}\)?){1}\s?\d{3}(\S?|\s?)?\d{4}  # 5 digit area code with optional +63 internationalisation or not, optional spaces and brackets.
-        |
-        (^\+63\s?\(?\d{4}\)?|^\(?\d{4}\)?){1}\s?\d{3}(\S?|\s?)?\d{4}  # 4 digit area code with optional +63 internationalisation or not, optional spaces and brackets.
-        |
-        (^\+63\s?\(?\d{3}\)?|^\(?\d{3}\)?){1}\s?\d{3}(\S?|\s?)?\d{4}  # 3 digit area code with optional +63 internationalisation or not, optional spaces and brackets.
-        |
-        (^\+63\s?\(?\d{2}\)?|^\(?\d{2}\)?){1}\s?\d{3}(\S?|\s?)?\d{4}  # 2 digit area code with optional +63 internationalisation or not, optional spaces and brackets.
-        |
-        (^\+63\s?\(?\d{1}\)?|^\(?\d{1}\)?){1}\s?\d{3}(\S?|\s?)?\d{4}  # 1 digit area code with optional +63 internationalisation or not, optional spaces and brackets.
-    )
-    (\s?\#\d*)?   # optional extension number shown with a loc. divider
-  /x";
-  // return true if valid, false otherwise
-  if (!preg_match($regex, $phonenumber)) {
-  	return FALSE;
-  }
-  else
-  {
-		return TRUE;
-  }
-}
-
-/**
- * Convert a valid Philippine phone number into standard +63 (2) 123-4567 or	+63 (2) 123-4567 loc. 123	or mobile +63 (919) 123-4567
- *
- * @param $phonenumber must be a valid ten-digit number (with optional extension)
- *
- */
-function format_ph_phone_number($phonenumber, $field = FALSE) {
-
-    $area = $number = $extension = $description = '';
-
-        //Simplify to 10 digit number and clean up ready for international reformat.
-        $phonenumber = preg_replace("/^\+63/","",$phonenumber);
-        $phonenumber = preg_replace("/\(/","",$phonenumber);
-        $phonenumber = preg_replace("/\)/","",$phonenumber);
-
-        //If there are some spaces in the number assume some level of preformatting
-            $regex = "/
-                # 5 digit area code.
-                (
-                    (\d{5}) # capture 5 digit area code
-                    (\s*)?     # ignore required separator to make a distinction with other area codes
-                    (\d{3}) # capture first set of numbers in the local number
-                    (\S?|\s*)?     # ignore optional separator
-                    (\d{4}) # capture second set of numbers in the local number
-                |
-                # 4 digit area code.
-                    (\d{4}) # capture 4 digit area code
-                    (\s*)?    # ignore required seperator
-                    (\d{3}) # capture first set of numbers in the local number
-                    (\S?|\s*)?     # ignore possible boundary
-                    (\d{4}) # capture second set of numbers in the local number
-                |
-                # 3 digit area code.
-                    (\d{3}) # capture 3 digit area code
-                    (\s*)?     # ignore required seperator
-                    (\d{3}) # capture first set of numbers in the local number
-                    (\S?|\s*)?     # ignore possible boundary
-                    (\d{4}) # capture second set of numbers in the local number
-                |
-                # 2 digit area code.
-                    (\d{2}) # capture 2 digit area code
-                    (\s*)?     # ignore required seperator
-                    (\d{3}) # capture first set of numbers in the local number
-                    (\S?|\s*)?     # ignore possible boundary
-                    (\d{4}) # capture second set of numbers in the local number
-                |
-                # 1 digit area code.
-                    (\d{1}) # capture 1 digit area code
-                    (\s*)?     # ignore required boundary to make a distinction with other area codes
-                    (\d{3}) # capture first set of numbers in the local number
-                    (\S?|\s*)?     # ignore possible boundary
-                    (\d{4}) # capture second set of numbers in the local number
-                )
-                # capture the optional extension number
-                (\s*loc\.\s*|\s*ext\.\s*)?
-                (\d*)?
-								([a-zA-Z0-9\-\. \/\,\']{0,})?
-            /x";
-            preg_match($regex, $phonenumber, $matches);
-            $area = $matches[2] . $matches[7] . $matches[12] . $matches[17] . $matches[22];
-            $number = $matches[4] . $matches[9] . $matches[14] . $matches[19] . $matches[24] . '-' . $matches[6] . $matches[11] . $matches[16] . $matches[21] . $matches[26];
-            $extension = $matches[28];
-						$description = $matches[29];
-
-      $phonenumber = '+63 (' . $area . ') ' . $number;
-      $phonenumber .= (empty($extension)) ? '' : " loc. $extension";
-			$phonenumber .= (empty($description))? '' : " $description";
-
-  return $phonenumber;
-}
diff --git phone.pk.inc phone.pk.inc
deleted file mode 100644
index 6c71c6e..0000000
--- phone.pk.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Pakistanese phone numbers.
- */
-
-function phone_pk_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Pakistan',
-    'error' => '"%value" is not a valid Pakistanese mobile phone number<br>Pakistanese phone numbers should only ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is valid
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_pk_phone_number($phonenumber) {
-  // define regular expression
-  $regex = "/^(\+)?([9]{1}[2]{1})?-? ?(\()?([0]{1})?[1-9]{2,4}(\))?-? ??(\()?[1-9]{4,7}(\))?$/i";
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Pakistan Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_pk_phone_number($phonenumber, $field) {
-
-  //$phonenumber = trim($phonenumber);
-
-   // do some formatting on the phone number
-
-/* ==> to be done ==> add the country code 
-   if ($field['phone_country_code']) {
-      if ($matches[1] != "+39") {
-  	$phonenumber = "+39" . " " . $phonenumber;
-      }
-   }
-*/ 
-   return $phonenumber;
-}
diff --git phone.pl.inc phone.pl.inc
deleted file mode 100644
index 57dad94..0000000
--- phone.pl.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Poland phone numbers.
- */
-
-function phone_pl_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Poland',
-    'error' => '"%value" is not a valid Polish mobile phone number<br>Polish phone numbers should only ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is valid
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_pl_phone_number($phonenumber) {
-  // define regular expression
-  $regex = "/^(\+48\s+)?\d{3}(\s*|\-)\d{3}(\s*|\-)\d{3}$/i";
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Polish Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_pl_phone_number($phonenumber, $field) {
-
-  //$phonenumber = trim($phonenumber);
-
-   // do some formatting on the phone number
-
-/* ==> to be done ==> add the country code 
-   if ($field['phone_country_code']) {
-      if ($matches[1] != "+39") {
-  	$phonenumber = "+39" . " " . $phonenumber;
-      }
-   }
-*/ 
-   return $phonenumber;
-}
diff --git phone.ru.inc phone.ru.inc
deleted file mode 100644
index 63ad29a..0000000
--- phone.ru.inc
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Russian phone numbers.
- */
-
-function phone_ru_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Russia',
-    'error' => '"%value" is not a valid Russian phone number<br>Russian Phone numbers should .... ',
-  );
-}
-
-/**
- * Verifies that $phonenumber is a valid ten-digit Russian phone number
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-
-function valid_ru_phone_number($phonenumber) {
-
-  //$phonenumber = trim($phonenumber);
-
-  // define regular expression
-  $regex = "/
-    \D*           # ignore non-digits
-    [78]?         # an optional 78
-    \D*           # optional separator
-    \d{3,5}       # area code 3-5 digit
-    \D*           # optional separator
-    \d{1,3}       # 3-digit prefix
-    \D*           # optional separator
-    \d{2}         # 2-digit line number
-    \D*           # optional separator
-    \d{2}         # 2-digit line number
-    \D*           # ignore trailing non-digits
-    /x";
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Convert a valid Russian phone number into standard +7 (495) 567-53-09 or +7 (444xx) 67-53-09 or mobile 8 910 414-56-90 format
- *
- * @param $phonenumber must be a valid ten-digit number (with optional extension)
- *
- */
-function format_ru_phone_number($phonenumber, $field = FALSE) {
-
-  // define regular expression
-  $regex = "/
-    ^\D*          # ignore non-digits
-    ([78])?       # an optional 78
-    \D*           # optional separator
-    (\d{3,5})  	  # area code 3-5 digit
-    \D*           # optional separator
-    (\d{1,3})  	  # capture 3-digit prefix
-    \D*           # optional separator
-    (\d{2})       # 2-digit line number
-    \D*           # optional separator
-    (\d{2})       # 2-digit line number
-    \D*           # ignore trailing non-digits
-  /x";
-
-  // get digits of phone number
-  preg_match($regex, $phonenumber, $matches);
-
-  // construct ten-digit phone number
-  $phonenumber = $matches[1] . ' (' . $matches[2] . ') ' . $matches[3] . ' - ' . $matches[4] . ' - ' . $matches[5];
-
-  return $phonenumber;
-}
diff --git phone.se.inc phone.se.inc
deleted file mode 100644
index 417718d..0000000
--- phone.se.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Swedish phone numbers.
- */
-
-function phone_se_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Sweden',
-    'error' => '"%value" is not a valid Swedish mobile phone number<br>Swedish phone numbers should only ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is valid
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_se_phone_number($phonenumber) {
-  // define regular expression
-  $regex = "/^(([+]\d{2}[ ][1-9]\d{0,2}[ ])|([0]\d{1,3}[-]))((\d{2}([ ]\d{2}){2})|(\d{3}([ ]\d{3})*([ ]\d{2})+))$/i";
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Sweden Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_se_phone_number($phonenumber, $field) {
-
-  //$phonenumber = trim($phonenumber);
-
-   // do some formatting on the phone number
-
-/* ==> to be done ==> add the country code 
-   if ($field['phone_country_code']) {
-      if ($matches[1] != "+39") {
-  	$phonenumber = "+39" . " " . $phonenumber;
-      }
-   }
-*/ 
-   return $phonenumber;
-}
diff --git phone.sg.inc phone.sg.inc
deleted file mode 100644
index 5b054f5..0000000
--- phone.sg.inc
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Singapore phone numbers.
- */
-
-function phone_sg_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Singapore',
-    'error' => '"%value" is not a valid Singaporean phone number<br>Singaporean phone numbers should only ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is valid
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_sg_phone_number($phonenumber) {
-  // define regular expression
-  /*
-    See: http://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore
-
-    Accepts:
-        +6561234567  / +6581234567  / +6591234567
-        +65 61234567 / +65 81234567 / +65 91234567
-        61234567     / 81234567     / 91234567
-  */
-
-  $regex = '/^(\+65)?\s?[689]\d{7}$/i';
-
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Singapore Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_sg_phone_number($phonenumber, $field) {
-
-  //$phonenumber = trim($phonenumber);
-
-   // do some formatting on the phone number
-
-/* ==> to be done ==> add the country code 
-   if ($field['phone_country_code']) {
-      if ($matches[1] != "+39") {
-  	$phonenumber = "+39" . " " . $phonenumber;
-      }
-   }
-*/ 
-   return $phonenumber;
-}
diff --git phone.ua.inc phone.ua.inc
deleted file mode 100644
index 3ca9b56..0000000
--- phone.ua.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for Ukrainian phone numbers.
- */
-
-function phone_ua_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - Ukraine',
-    'error' => '"%value" is not a valid Ukrainian mobile phone number<br>Ukrainian phone numbers should only ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is valid
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_ua_phone_number($phonenumber) {
-  // define regular expression
-  $regex = "/^((8|\+38)-?)?(\(?044\)?)?-?\d{3}-?\d{2}-?\d{2}$/i";
-
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Formatting for Unkraine Phone Numbers.
- *
- * @param string $phonenumber
- * @return string Returns a string containting the phone number with some formatting.
- */
-function format_ua_phone_number($phonenumber, $field) {
-
-  //$phonenumber = trim($phonenumber);
-
-   // do some formatting on the phone number
-
-/* ==> to be done ==> add the country code 
-   if ($field['phone_country_code']) {
-      if ($matches[1] != "+39") {
-  	$phonenumber = "+39" . " " . $phonenumber;
-      }
-   }
-*/ 
-   return $phonenumber;
-}
diff --git phone.za.inc phone.za.inc
deleted file mode 100644
index 205590e..0000000
--- phone.za.inc
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-/**
- * @file
- * CCK Field for South African phone numbers.
- */
-
-function phone_za_metadata() {
-  // These strings are translated using t() on output.
-  return array(
-    'label' => 'Phone Numbers - South Africa',
-    'error' => '"%value" is not a valid South African phone number!<br>South African phone numbers should ...',
-  );
-}
-
-/**
- * Verifies that $phonenumber is a valid South African phone number
- *
- * @param string $phonenumber
- * @return boolean Returns boolean FALSE if the phone number is not valid.
- */
-function valid_za_phone_number($phonenumber) {
-
-  $phonenumber = trim($phonenumber);
-
-  // define regular expression
-  $regex = '/^((?:\+27|27)|0)[ ]*((\d{2})(-| )?(\d{3})(-| )?(\d{4})|(\d{2})( |-)(\d{7}))$/';
-  
-  // return true if valid, false otherwise
-  return (bool) preg_match($regex, $phonenumber);
-}
-
-/**
- * Convert a valid South African phone number into standard ... format
- *
- * @param $phonenumber must be a valid  ... digit number (with optional international prefix)
- *
- */
-function format_za_phone_number($phonenumber, $field) {
-
-  // define regular expression
-  $regex = '/^((?:\+27|27)|0)[ ]*((\d{2})(-| )?(\d{3})(-| )?(\d{4})|(\d{2})( |-)(\d{7}))$/';
-
-  // get digits of phone number
-  preg_match($regex, $phonenumber, $matches);
-  
-/*
-  drupal_set_message('$matches[1] = ' . $matches[1], 'error');
-  drupal_set_message('$matches[2] = ' . $matches[2], 'error');
-  drupal_set_message('$matches[3] = ' . $matches[3], 'error');
-  drupal_set_message('$matches[4] = ' . $matches[4], 'error');
-  drupal_set_message('$matches[5] = ' . $matches[5], 'error');
-  drupal_set_message('$matches[6] = ' . $matches[6], 'error');
-  drupal_set_message('$matches[7] = ' . $matches[7], 'error');
-  drupal_set_message('$matches[8] = ' . $matches[8], 'error');
-*/
-
-  if ($field['phone_country_code']) {
-    	$phonenumber = '+27' . ' ' . $matches[3] .'-'. $matches[5] .'-'. $matches[7];
-  }
-  else {
-  	$phonenumber = $matches[3] .'-'. $matches[5] .'-'. $matches[7];
-  }
-
-  return $phonenumber;
-}
diff --git tests/phone-au.test tests/phone-au.test
deleted file mode 100644
index 67e9c9d..0000000
--- tests/phone-au.test
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-class AUPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Australia Phone number test'),
-      'description' => t('Tests various valid and invalid Australia phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneAUValid() {
-    $this->assertTrue(valid_phone_number('au', '0200-0299'), t('ACT - 0200-0299'));
-    $this->assertTrue(valid_phone_number('au', '2600-2639'), t('ACT - 2600-2639'));
-    $this->assertTrue(valid_phone_number('au', '1000-1999'), t('NSW - 1000-1999'));
-    $this->assertTrue(valid_phone_number('au', '2000-2599'), t('NSW - 2000-2599'));
-    $this->assertTrue(valid_phone_number('au', '2640-2914'), t('NSW - 2640-2914'));
-    $this->assertTrue(valid_phone_number('au', '0900-0999'), t('NT - 0900-0999'));
-    $this->assertTrue(valid_phone_number('au', '0800-0899'), t('NT - 0800-0899'));
-    $this->assertTrue(valid_phone_number('au', '9000-9999'), t('QLD - 9000-9999'));
-    $this->assertTrue(valid_phone_number('au', '4000-4999'), t('QLD - 4000-4999'));
-    $this->assertTrue(valid_phone_number('au', '5000-5999'), t('SA - 5000-599'));
-    $this->assertTrue(valid_phone_number('au', '7800-7999'), t('TAS - 7800-7999'));
-    $this->assertTrue(valid_phone_number('au', '7000-7499'), t('TAS - 7000-7499'));
-    $this->assertTrue(valid_phone_number('au', '8000-8999'), t('VIC - 8000-8999'));
-    $this->assertTrue(valid_phone_number('au', '3000-3999'), t('VIC - 3000-3999'));
-    $this->assertTrue(valid_phone_number('au', '6800-6999'), t('WA - 6800-6999'));
-    $this->assertTrue(valid_phone_number('au', '6000-6799'), t('WA - 6000-6799'));
-  }
-
-  public function testPhoneAUInvalid() {
-    $this->assertFalse(valid_phone_number('au', '0300'), t('Test invalid - 0300'));
-    $this->assertFalse(valid_phone_number('au', '7612'), t('Test invalid - 7612'));
-    $this->assertFalse(valid_phone_number('au', '2915'), t('Test invalid - 2915'));
-    $this->assertFalse(valid_phone_number('au', '2415b'), t('Test invalid - 2415b'));
-  }
-
-  public function testPhoneAUFormatting() {
-    //$this->assertEqual(format_phone_number('au', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-be.test tests/phone-be.test
deleted file mode 100644
index 6943ff0..0000000
--- tests/phone-be.test
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-class BEPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Belgium Phone number test'),
-      'description' => t('Tests various valid and invalid Belgium phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneBEValid() {
-    $this->assertTrue(valid_phone_number('be', '023456789'), '"023456789" should be valid');
-    $this->assertTrue(valid_phone_number('be', '0478990011'), '"0478990011" should be  valid');
-    $this->assertTrue(valid_phone_number('be', '01 234 56 78'), '"01 234 56 78" should be  valid');
-    $this->assertTrue(valid_phone_number('be', '+32 12345678'), '"+32 12345678" should be  valid');    
-  }
-
-  public function testPhoneBEInvalid() {
-    $this->assertFalse(valid_phone_number('be', '+323456789'), t('Test invalid'));
-    $this->assertFalse(valid_phone_number('be', '02 345 67 89'), t('Test invalid'));
-  }
-
-  public function testPhoneBEFormatting() {
-    //$this->assertEqual(format_phone_number('be', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-br.test tests/phone-br.test
deleted file mode 100644
index 2573b67..0000000
--- tests/phone-br.test
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-class BRPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Brazil Phone number test'),
-      'description' => t('Tests various valid and invalid Brazil phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneBRValid() {
-    $this->assertTrue(valid_phone_number('br', '(11) 1234-5678'), t('Test valid - (11) 1234-5678'));
-    $this->assertTrue(valid_phone_number('br', '1234-5678 '), t('Test valid - 1234-5678'));
-    $this->assertTrue(valid_phone_number('br', '12345678'), t('Test valid - 12345678'));
-    $this->assertTrue(valid_phone_number('br', '+55 11 2222-3333'), t('Test valid - +55 11 2222-3333'));
-    
-    $this->assertTrue(valid_phone_number('br', '011 5555-1234'), t('Test valid - 011 5555-1234'));
-    $this->assertTrue(valid_phone_number('br', '(011) 5555 1234'), t('Test valid - (011) 5555 1234'));
-    $this->assertTrue(valid_phone_number('br', '(11) 5555.1234'), t('Test valid - (11) 5555.1234'));
-    $this->assertTrue(valid_phone_number('br', '1155551234'), t('Test valid - 1155551234'));
-  }
-
-  public function testPhoneBRInvalid() {
-    $this->assertFalse(valid_phone_number('br', '123-45678'), t('Test invalid - 123-45678'));
-
-    $this->assertFalse(valid_phone_number('br', '(01) 5555 1234'), t('Test invalid - (01) 5555 1234'));
-    $this->assertFalse(valid_phone_number('br', '(11) 0555.1234'), t('Test invalid - (11) 0555.1234'));
-    $this->assertFalse(valid_phone_number('br', '(11) 5555 abcd'), t('Test invalid - (11) 5555 abcd'));
-  }
-
-  public function testPhoneBRFormatting() {
-    $this->assertEqual(format_br_phone_number('+55 11 2222-3333', null), '+55 (11) 222-333', t('Brazil - +55 (11) 222-333'));     
-  }
-}
\ No newline at end of file
diff --git tests/phone-ca.test tests/phone-ca.test
deleted file mode 100644
index bf6477c..0000000
--- tests/phone-ca.test
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-class CAPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Canada & US Phone number test'),
-      'description' => t('Tests various valid and invalid Canada & US phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneCAValid() {
-    $this->assertTrue(valid_phone_number('ca', '1-800-555-1212'), t('Test valid - 1-800-555-1212'));
-    $this->assertTrue(valid_phone_number('ca', '800-555-1212'), t('Test valid - 800-555-1212'));
-    $this->assertTrue(valid_phone_number('ca', '(201)223-4567'), t('Test valid - (201)223-4567'));
-    $this->assertTrue(valid_phone_number('ca', '604 543 9245'), t('Test valid - British Columbia 604 543 9245'));
-    
-  }
-
-  public function testPhoneCAInvalid() {
-    //$this->assertFalse(valid_phone_number('ca', '021 3012 3456'), t('Test invalid '));
-  }
-
-  public function testPhoneCAFormatting() {
-    //$this->assertEqual(format_phone_number('ca', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-
-  }
-}
\ No newline at end of file
diff --git tests/phone-ch.test tests/phone-ch.test
deleted file mode 100644
index 98dcd3c..0000000
--- tests/phone-ch.test
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-class CHPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Swiss Phone number test'),
-      'description' => t('Tests various valid and invalid Swiss phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneCHValid() {
-    //$this->assertTrue(valid_phone_number('ch', '04 476 0000'), t('Test valid'));
-
-
-  }
-
-  public function testPhoneCHInvalid() {
-    //$this->assertFalse(valid_phone_number('ch', '021 3012 3456'), t('Test invalid'));
-
-  }
-
-  public function testPhoneCHFormatting() {
-    //$this->assertEqual(format_phone_number('ch', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-cl.test tests/phone-cl.test
deleted file mode 100644
index 92a13d9..0000000
--- tests/phone-cl.test
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-class CLPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Chili Phone number test'),
-      'description' => t('Tests various valid and invalid Chili phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneCLValid() {
-    $this->assertTrue(valid_phone_number('cl', '(041)245-9848'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('cl', '(063)421-232'), t('Test valid'));
-  }
-
-  public function testPhoneCLInvalid() {
-    $this->assertFalse(valid_phone_number('cl', '0412459848'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('cl', '063421232'), t('Test invalid '));
-  }
-
-  public function testPhoneCLFormatting() {
-    //$this->assertEqual(format_phone_number('cl', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-cn.test tests/phone-cn.test
deleted file mode 100644
index 0286020..0000000
--- tests/phone-cn.test
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-class CNPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('China People\'s Republic Phone number test'),
-      'description' => t('Tests various valid and invalid Chinese People\'s Republic phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneCNValid() {
-    $this->assertTrue(valid_phone_number('cn', '86-755-83998006'), t('Test valid - 86-755-83998006'));
-    $this->assertTrue(valid_phone_number('cn', '86-10-5851 6688'), t('Test valid - 86-10-5851 6688'));
-    $this->assertTrue(valid_phone_number('cn', '86-10-6512 4940'), t('Test valid - 86-10-6512 4940'));
-    $this->assertTrue(valid_phone_number('cn', '+86 21 6103 2200'), t('Test valid - +86 21 6103 2200'));
-    $this->assertTrue(valid_phone_number('cn', '+86 10.85.32.83.23'), t('Test valid - +86 10.85.32.83.23'));
-    $this->assertTrue(valid_phone_number('cn', '755-83998006'), t('Test valid - 755-83998006'));
-    $this->assertTrue(valid_phone_number('cn', '+86-10-5851 6688'), t('Test valid - +86-10-5851 6688'));
-    $this->assertTrue(valid_phone_number('cn', '10.85.32.83.23'), t('Test valid - 10.85.32.83.23'));
-    $this->assertTrue(valid_phone_number('cn', '13900000000'), t('Test valid - 13900000000'));
-    $this->assertTrue(valid_phone_number('cn', '10-5851 6688'), t('Test valid - 10-5851 6688'));
-  }
-
-  public function testPhoneCNInvalid() {
-    //$this->assertFalse(valid_phone_number('cn', '021 3012 3456'), t('Test invalid - 021 3012 3456'));
-  }
-
-  public function testPhoneCNFormatting() {
-    //$this->assertEqual(format_phone_number('cn', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-cr.test tests/phone-cr.test
deleted file mode 100644
index 0f2a97e..0000000
--- tests/phone-cr.test
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-class CRPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Costa Rica Phone number test'),
-      'description' => t('Tests various valid and invalid Costa Rica phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneCRValid() {
-    //$this->assertTrue(valid_phone_number('cr', '04 476 0000'), t('Test valid'));
-  }
-
-  public function testPhoneCRInvalid() {
-    //$this->assertFalse(valid_phone_number('cr', '021 3012 3456'), t('Test invalid '));
-  }
-
-  public function testPhoneCRFormatting() {
-    //$this->assertEqual(format_phone_number('cr', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-cs.test tests/phone-cs.test
deleted file mode 100644
index 99abc92..0000000
--- tests/phone-cs.test
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-class CSPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Czech Republic Phone number test'),
-      'description' => t('Tests various valid and invalid Czech Republic phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneCSValid() {
-    $this->assertTrue(valid_phone_number('cs', '+420 999 999 999'), t('Test valid - +420 999 999 999'));
-  }
-
-  public function testPhoneCSInvalid() {
-    //$this->assertFalse(valid_phone_number('cs', '021 3012 3456'), t('Test invalid - 021 3012 3456'));
-  }
-
-  public function testPhoneCSFormatting() {
-    //$this->assertEqual(format_phone_number('cs', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-eg.test tests/phone-eg.test
deleted file mode 100644
index 9fb3631..0000000
--- tests/phone-eg.test
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-class EGPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Egypt Phone number test'),
-      'description' => t('Tests various valid and invalid Egypt phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneEGValid() {
-    //$this->assertTrue(valid_phone_number('eg', '04 476 0000'), t('Test valid'));
-  }
-
-  public function testPhoneEGInvalid() {
-    //$this->assertFalse(valid_phone_number('eg', '021 3012 3456'), t('Test invalid '));
-  }
-
-  public function testPhoneEGFormatting() {
-    //$this->assertEqual(format_phone_number('eg', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-es.test tests/phone-es.test
deleted file mode 100644
index e5394eb..0000000
--- tests/phone-es.test
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-class ESPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Spain Phone number test'),
-      'description' => t('Tests various valid and invalid Spain phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneESValid() {
-    $this->assertTrue(valid_phone_number('es', '972367087'), t('Test valid - 972367087'));
-    $this->assertTrue(valid_phone_number('es', '97-3770866'), t('Test valid - 97-3770866'));
-    $this->assertTrue(valid_phone_number('es', '972-377086'), t('Test valid - 972-377086'));
-  }
-
-  public function testPhoneESInvalid() {
-    $this->assertFalse(valid_phone_number('es', '9988-989898'), t('Test invalid - 9988-989898'));
-    $this->assertFalse(valid_phone_number('es', '989898988989'), t('Test invalid - 989898988989'));
-    $this->assertFalse(valid_phone_number('es', '9 9898989898'), t('Test invalid - 9 9898989898'));  
-  }
-
-  public function testPhoneESFormatting() {
-    //$this->assertEqual(format_phone_number('es', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
-
diff --git tests/phone-fr.test tests/phone-fr.test
deleted file mode 100644
index 4524ccd..0000000
--- tests/phone-fr.test
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-
-// Copyright 2009 Thierry GUEGAN http://www.arvoriad.com
-
-/**
-/**
-* Unit tests for Phone module.
-*/
-class PhoneFrenchTest extends DrupalWebTestCase {
-
-  public static function getInfo() {
-    return array(
-      'name' 		=> t('France Phone number test'),
-      'description' 	=> t('Executes test suite for validating / formatting France phone number.'),
-      'group' 		=> t('Phone')
-    );
-  }
-
-  function setUp() {
-    parent::setUp();
-
-    include_once('./'. drupal_get_path('module', 'phone') .'/phone.fr.inc');
-  }
-  
-
-  public function testPhoneFRValid() {
-    // test cleaning phone number
-    $this->assertTrue(valid_phone_number('fr', ' +33   123 45 - (67) 89'), "' +33   123 45 - (67) 89' should be valid");
-    
-    $this->assertTrue(valid_phone_number('fr', '+33123456789'), "'+33123456789' should be valid");
-    $this->assertTrue(valid_phone_number('fr', '0123456789'), "'0123456789' should be valid");
-
-    $this->assertTrue(valid_phone_number('fr', '+33223456789'), "'+33223456789' should be valid");
-    $this->assertTrue(valid_phone_number('fr', '0223456789'), "'0223456789' should be valid");
-
-    $this->assertTrue(valid_phone_number('fr', '+33323456789'), "'+33323456789' should be valid");
-    $this->assertTrue(valid_phone_number('fr', '0323456789'), "'0323456789' should be valid");
-
-    $this->assertTrue(valid_phone_number('fr', '+33423456789'), "'+33423456789' should be valid");
-    $this->assertTrue(valid_phone_number('fr', '0423456789'), "'0423456789' should be valid");
-
-    $this->assertTrue(valid_phone_number('fr', '+33523456789'), "'+33523456789' should be valid");
-    $this->assertTrue(valid_phone_number('fr', '0523456789'), "'0523456789' should be valid");
-
-
-    // 06... mobile
-    $this->assertTrue(valid_phone_number('fr', '+33623456789'), "'+33623456789' should be valid");
-    $this->assertTrue(valid_phone_number('fr', '0623456789'), "'0623456789' should be valid");
-
-    // 085... virtual private network
-    $this->assertTrue(valid_phone_number('fr', '+33853456789'), "'+33853456789' should be valid");
-    $this->assertTrue(valid_phone_number('fr', '0853456789'), "'0853456789' should be valid");
-
-    // 087...
-    // 870... 871... 872... 873... 874... 875... 877... 878... 879... assigned
-    foreach (array('870', '871', '872', '873', '874', '875', '877', '878', '879') as $za) {
-      $this->assertTrue(valid_phone_number('fr', '+33'. $za .'123456'), "'+33 $za 1234567' is be valid");
-      $this->assertTrue(valid_phone_number('fr', '0'. $za .'123456'), "'0 $za 1234567' is be valid");
-    }
-  }
-
-  public function testPhoneFRInvalid() {
-
-    $this->assertFalse(valid_phone_number('fr', '+33 123456789a'), "'+33 123456789a' should not be valid because wrong char");
-    $this->assertFalse(valid_phone_number('fr', '+33 1234567a89'), "'+33 1234567a89' should not be valid because wrong char");
-    $this->assertFalse(valid_phone_number('fr', '0 123456789a'), "'0 123456789a' should not be valid because wrong char");
-    $this->assertFalse(valid_phone_number('fr', '0 1234567a89'), "'0 1234567a89' should not be valid because wrong char");
-
-    $this->assertFalse(valid_phone_number('fr', '+33 1234567890'), "'+33 1234567890' should not be valid because too long");
-    $this->assertFalse(valid_phone_number('fr', '+33 12345678'), "'+33 12345678' should not be valid because too short");
-    $this->assertFalse(valid_phone_number('fr', '0 1234567890'), "'0 1234567890' should not be valid because too long");
-    $this->assertFalse(valid_phone_number('fr', '0 12345678'), "'0 12345678' should not be valid because too short");
-
-
-
-
-    // 07... not assigned
-    $this->assertFalse(valid_phone_number('fr', '+33723456789'), "'+33723456789' is unassigned so should not be valid");
-    $this->assertFalse(valid_phone_number('fr', '0723456789'), "'0723456789' is unassigned so should not be valid");
-
-
-
-    // except 0876... not assigned
-    $this->assertFalse(valid_phone_number('fr', '+33876456789'), "'+33873456789' is unassigned so should not be valid");
-    $this->assertFalse(valid_phone_number('fr', '0876456789'), "'0873456789' is unassigned so should not be valid");
-
-    // 80... 81... 82... 83... 84... 86... 88... 89... not assigned
-    foreach (array('80', '81', '82', '83', '84', '86', '88', '89') as $za) {
-      $this->assertFalse(valid_phone_number('fr', '+33'. $za .'1234567'), "'+33'. $za .'1234567' is unassigned so should not be valid");
-      $this->assertFalse(valid_phone_number('fr', '0'. $za .'1234567'), "'0'. $za .'1234567' is unassigned so should not be valid");
-    }
-
-    // 09... not assigned
-    $this->assertFalse(valid_phone_number('fr', '+33923456789'), "'+33923456789' is unassigned so should not be valid");
-    $this->assertFalse(valid_phone_number('fr', '0923456789'), "'0923456789' is unassigned so should not be valid");
-
-    // 00... not assigned
-    $this->assertFalse(valid_phone_number('fr', '+33023456789'), "'+33023456789' is unassigned so should not be valid");
-    $this->assertFalse(valid_phone_number('fr', '0023456789'), "'0023456789' is unassigned so should not be valid");
-  }
-
-  public function testPhoneFRFormatting() {
-    // test cleaning phone number
-
-    $this->assertEqual(format_fr_phone_number('+33 123456789a'), '+33 123456789a', "'+33 123456789a', not valid so just ouptut without formatting");
-    $this->assertEqual(format_fr_phone_number('01234567a8'), '01234567a8', "'01234567a8', not valid so just ouptut without formatting");
-
-    $this->assertEqual(format_fr_phone_number('+33 123456789'), '0123456789', "international --> national");
-    $this->assertEqual(format_fr_phone_number(' +33   123 45 - (67) 89'), '0123456789', "international --> national");
-
-    $add_country_code = array('phone_country_code'=> TRUE);
-    $this->assertEqual(format_fr_phone_number('+33 123456789', $add_country_code), '+33 123456789', "international --> international");
-    $this->assertEqual(format_fr_phone_number(' +33   123 45 - (67) 89', $add_country_code), '+33 123456789', "international --> international");
-  }
-}
\ No newline at end of file
diff --git tests/phone-hu.test tests/phone-hu.test
deleted file mode 100644
index 0878e0b..0000000
--- tests/phone-hu.test
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-class HUPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Hungary Phone number test'),
-      'description' => t('Tests various valid and invalid Hungary phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneHUValid() {
-    $this->assertTrue(valid_phone_number('hu', '+3611234567'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '+3676123456'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '+36301234567'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '+36 1 1234567'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '+36 76 123456'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '+36 30 1234567'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '+36(1)1234567'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '+36(76)123456'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '+36(30)1234567'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '1/123-4567'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '76/123-456'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('hu', '30/123-45-67'), t('Test valid'));
-  }
-
-  public function testPhoneHUInvalid() {
-    $this->assertFalse(valid_phone_number('hu', '+0011234567'), t('Test invalid'));
-  }
-
-  public function testPhoneHUFormatting() {
-    //$this->assertEqual(format_phone_number('hu', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-il.test tests/phone-il.test
deleted file mode 100644
index a5e763a..0000000
--- tests/phone-il.test
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-class ILPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Israel Phone number test'),
-      'description' => t('Tests various valid and invalid Israel phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneILValid() {
-    $this->assertTrue(valid_phone_number('il', '1800 999 999'), '"1800 999 999" should be valid');    
-  }
-
-  public function testPhoneILInvalid() {
-    //$this->assertFalse(valid_phone_number('il', '021 3012 3456'), t('Test invalid'));
-  }
-
-  public function testPhoneILFormatting() {
-    $this->assertEqual(format_phone_number('il', '1800 999 999', null), '1800 999 999', 'Formatting OK "1800 999 999" --> "1800 999 999"');
-  }
-}
\ No newline at end of file
diff --git tests/phone-it.test tests/phone-it.test
deleted file mode 100644
index bedc6e8..0000000
--- tests/phone-it.test
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-class ITPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Italia Phone number test'),
-      'description' => t('Tests various valid and invalid Italia phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneITValid() {
-    $this->assertTrue(valid_phone_number('it', '06/2034567'), t('Test valid - 06/2034567'));
-    $this->assertTrue(valid_phone_number('it', '+39 02/123456'), t('Test valid - +39 02/123456'));
-    $this->assertTrue(valid_phone_number('it', '02-343536'), t('Test valid - 02-343536'));
-    $this->assertTrue(valid_phone_number('it', '02/343536'), t('Test valid - 02/343536'));
-    $this->assertTrue(valid_phone_number('it', '02 343536'), t('Test valid - 02 343536'));
-    $this->assertTrue(valid_phone_number('it', '+393381234567'), t('Test valid - +393381234567'));
-    $this->assertTrue(valid_phone_number('it', '+39 3381234567'), t('Test valid - +39 3381234567'));
-    $this->assertTrue(valid_phone_number('it', '+39 338 1234567'), t('Test valid - +39 338 1234567'));
-    $this->assertTrue(valid_phone_number('it', '+39 338-1234567'), t('Test valid - +39 338-1234567'));
-    $this->assertTrue(valid_phone_number('it', '3381234567'), t('Test valid - 3381234567'));
-    $this->assertTrue(valid_phone_number('it', '3381234567'), t('Test valid - 3381234567'));
-    $this->assertTrue(valid_phone_number('it', '338 1234567'), t('Test valid - 338 1234567'));
-    $this->assertTrue(valid_phone_number('it', '338-1234567'), t('Test valid - 338-1234567'));
-  }
-
-  public function testPhoneITInvalid() {
-    $this->assertFalse(valid_phone_number('it', '02a343536'), t('Test invalid - 02a343536'));
-    $this->assertFalse(valid_phone_number('it', '02+343536'), t('Test invalid - 02+343536'));
-    $this->assertFalse(valid_phone_number('it', '0039 338 1234567'), t('Test invalid - 0039 338 1234567'));
-    $this->assertFalse(valid_phone_number('it', '(338)1234567'), t('Test invalid - (338)1234567'));    
-  }
-
-  public function testPhoneITFormatting() {
-    //$this->assertEqual(format_phone_number('it', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
-
diff --git tests/phone-jo.test tests/phone-jo.test
deleted file mode 100644
index aeeb14e..0000000
--- tests/phone-jo.test
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-class JOPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Jordania Phone number test'),
-      'description' => t('Tests various valid and invalid Jordania phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneJOValid() {
-    //$this->assertTrue(valid_phone_number('jo', '04 476 0000'), t('Test valid'));
-  }
-
-  public function testPhoneJOInvalid() {
-    //$this->assertFalse(valid_phone_number('jo', '021 3012 3456'), t('Test invalid'));
-  }
-
-  public function testPhoneJOFormatting() {
-    //$this->assertEqual(format_phone_number('jo', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-nl.test tests/phone-nl.test
deleted file mode 100644
index 6886399..0000000
--- tests/phone-nl.test
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-class NLPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Netherland Phone number test'),
-      'description' => t('Tests various valid and invalid Netherland phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneNLValid() {
-    //$this->assertTrue(valid_phone_number('nl', '04 476 0000'), t('Test valid'));
-  }
-
-  public function testPhoneNLInvalid() {
-    //$this->assertFalse(valid_phone_number('nl', '021 3012 3456'), t('Test invalid '));
-  }
-
-  public function testPhoneNLFormatting() {
-    //$this->assertEqual(format_phone_number('nl', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-nz.test tests/phone-nz.test
deleted file mode 100644
index 57b7d1b..0000000
--- tests/phone-nz.test
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-class NZPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('New Zealand Phone number test'),
-      'description' => t('Tests various valid and invalid New Zealand phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneNZValid() {
-    $this->assertTrue(valid_phone_number('nz', '04 476 0000'), t('Test standard regional number 04 476 0000'));
-    $this->assertTrue(valid_phone_number('nz', '+64 4 476 0000'), t('Test international variation of regional +64 4 476 0000'));
-    $this->assertTrue(valid_phone_number('nz', '+6444760000'), t('Test international variation of regional +6444760000'));
-    $this->assertTrue(valid_phone_number('nz', '+649302 0000'), t('Test slightly weird variation of international +649302 0000'));
-    $this->assertTrue(valid_phone_number('nz', '(04) 476 0000'), t('Test bracketed regional (04) 476 0000'));
-    $this->assertTrue(valid_phone_number('nz', '(04) 476-0000'), t('Test hyphenated regional (04) 476-0000'));
-    $this->assertTrue(valid_phone_number('nz', '03 903-1234'), t('Test valid South Island regional 03 903-1234'));
-    $this->assertTrue(valid_phone_number('nz', '021 123 456'), t('Test valid 8-digit Vodafone number 021 739 733'));
-    $this->assertTrue(valid_phone_number('nz', '(021) 123 456'), t('Test bracketed 8-digit Vodafone number (021) 739 733'));
-    $this->assertTrue(valid_phone_number('nz', '+6421123456'), t('Test international Vodafone +6421123456'));
-    $this->assertTrue(valid_phone_number('nz', '021 0101 2345'), t('Test 10-digit valid Vodafone number 021 2102 2345'));
-    $this->assertTrue(valid_phone_number('nz', '+642101012345'), t('Test international version 10-digit Vodafone +642121012345'));
-    $this->assertTrue(valid_phone_number('nz', '027 680 1234'), t('Test valid 9-digit Telecom Mobile number'));
-    $this->assertTrue(valid_phone_number('nz', '+64 27 680 1234'), t('Test valid international version of Telecom 9-digit +64 27 680 1234'));
-    $this->assertTrue(valid_phone_number('nz', '0800 83 83 83'), t('Test valid 0800 83 83 83 Pizza Hut'));
-    $this->assertTrue(valid_phone_number('nz', '0900 87687'), t('Test valid 0900 TROTS'));
-    $this->assertTrue(valid_phone_number('nz', '026 123 4567'), t('Test valid Telecom pager 026 123 4567'));
-    $this->assertTrue(valid_phone_number('nz', '022 123 4567'), t('Test valid NZ Comms mobile 022 123 4567'));
-    $this->assertTrue(valid_phone_number('nz', '22 123 4567'), t('Test slightly naughty lack of STD NZ Comms 22 123 4567'));
-    $this->assertTrue(valid_phone_number('nz', '020 123 4567'), t('Test valid Telecom Mobile Radio 020 123 4567'));
-    $this->assertTrue(valid_phone_number('nz', '029 123 4567'), t('Test valid TelstraClear Mobile Radio 029 123 4567'));
-    $this->assertTrue(valid_phone_number('nz', '+64 24 123 456'), t('Test valid Scott Base +64 24 123 456'));
-
-  }
-
-  public function testPhoneNZInvalid() {
-    $this->assertFalse(valid_phone_number('nz', '021 3012 3456'), t('Test invalid 10-digit Vodafone number in wrong range 021 3012 3456'));
-    $this->assertFalse(valid_phone_number('nz', '04 701 1234'), t('Test invalid Wellington regional number 04 701 1234'));
-    $this->assertFalse(valid_phone_number('nz', '(06) 412 3456'), t('Test invalid Manawatu regional number (06) 412 3456'));
-    $this->assertFalse(valid_phone_number('nz', '04 123 456'), t('Test too short Wellington regional number 04 123 456'));
-    $this->assertFalse(valid_phone_number('nz', '[04] 123 4567'), t('Test invalid character Wellington regional [04] 123 4567'));
-    $this->assertFalse(valid_phone_number('nz', '09 701 2345'), t('Test invalid Auckland regional 09 701 2345'));
-    $this->assertFalse(valid_phone_number('nz', '028 123 4567'), t('Test invalid mobile range 028 123 4567'));
-    $this->assertFalse(valid_phone_number('nz', '027 1234 5678'), t('Test invalid Telecom mobile length 027 1234 5678'));
-  }
-
-  public function testPhoneNZFormatting() {
-    $this->assertEqual(format_phone_number('nz', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-    $this->assertEqual(format_phone_number('nz', '021123456', null), '(021) 123 456', t('Check 6-digit domestic mobile format'));
-    $this->assertEqual(format_phone_number('nz', '0211234567', null), '(021) 123 4567', t('Check 7-digit domestic mobile format'));
-    $this->assertEqual(format_phone_number('nz', '+64211234567', null), '+64 21 123 4567', t('Check 7-digit international mobile format'));
-    $this->assertEqual(format_phone_number('nz', '02101234567', null), '(021) 0123 4567', t('Check 8-digit domestic mobile format'));
-    $this->assertEqual(format_phone_number('nz', '+642101234567', null), '+64 21 0123 4567', t('Check 8-digit international mobile format'));
-    $this->assertEqual(format_phone_number('nz', '041234567', null), '(04) 123 4567', t('Check regional number format (domestic)'));
-    $this->assertEqual(format_phone_number('nz', '+6441234567', null), '+64 4 123 4567', t('Check regional number format (international)'));
-    $this->assertEqual(format_phone_number('nz', '041234567x1234', null), '(04) 123 4567 x1234', t('Check regional number format with extension (domestic)'));
-    $this->assertEqual(format_phone_number('nz', '+6441234567x1234', null), '+64 4 123 4567 x1234', t('Check regional number format with extension (international)'));
-    $this->assertEqual(format_phone_number('nz', '0800 83 83 83', null), '0800 838383', t('Check 0800 number formatting (6 digit)'));
-    $this->assertEqual(format_phone_number('nz', '0800 123 4567', null), '0800 123 4567', t('Check 0800 number formatting (7 digit)'));
-    $this->assertEqual(format_phone_number('nz', '0800 12345', null), '0800 12345', t('Check 0800 number formatting (5 digit)'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-pa.test tests/phone-pa.test
deleted file mode 100644
index 85d865d..0000000
--- tests/phone-pa.test
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-
-class PhonePanamanianTest extends DrupalWebTestCase {
-
-  public static function getInfo() {
-    return array(
-      'name' => t('Panamanian phone'),
-      'description' => t('Executes test suite for validating / formatting Panamanian phone number.'),
-      'group' => t('Phone'),
-    );
-  }
-
-  function setUp() {
-    parent::setUp();
-
-    include_once('./'. drupal_get_path('module', 'phone') .'/phone.pa.inc');
-  }
-
-  function testValidatingPanamenianPhoneNumber() {
-    $this->assertTrue(valid_pa_phone_number('+507 260-4334'), '+507 260-4334 should be valid');
-    $this->assertTrue(valid_pa_phone_number('+507 2604334'), '+507 2604334 should be valid');
-    $this->assertTrue(valid_pa_phone_number('+507 260 4334'), '+507 260 4334 should be valid');
-    $this->assertTrue(valid_pa_phone_number('00507 2603133'), '00507 2603133 should be valid');
-    $this->assertTrue(valid_pa_phone_number('00507 260-3133'), '00507 260-3133 should be valid');
-    $this->assertTrue(valid_pa_phone_number('00507 260 4334'), '00507 260 4334 should be valid');
-    $this->assertTrue(valid_pa_phone_number('260 3133'), '260 3133 should be valid');
-    $this->assertTrue(valid_pa_phone_number('260-3133'), '260-3133 should be valid');
-    $this->assertTrue(valid_pa_phone_number('2603133'), '2603133 should be valid');
-
-    //Cellphones
-    $this->assertTrue(valid_pa_phone_number('+507 6545-4345'), '+507 6545-4345 should be valid');
-    $this->assertTrue(valid_pa_phone_number('+507 65454345'), '+507 65454345 should be valid');
-    $this->assertTrue(valid_pa_phone_number('+507 6545 4345'), '+507 6545 4345 should be valid');
-    $this->assertTrue(valid_pa_phone_number('00507 6545-4345'), '00507 6545-4345 should be valid');
-    $this->assertTrue(valid_pa_phone_number('00507 6545 4345'), '00507 6545 4345 should be valid');
-    $this->assertTrue(valid_pa_phone_number('00507 65454345'), '00507 65454345 should be valid');
-    $this->assertTrue(valid_pa_phone_number('6545-4345'), '6545-4345 should be valid');
-    $this->assertTrue(valid_pa_phone_number('6545 4345'), '6545 4345 should be valid');
-    $this->assertTrue(valid_pa_phone_number('65454345'), '65454345 should be valid');
-
-    //Invalid
-    $this->assertFalse(valid_pa_phone_number('35343'), '35343 should not be valid');
-    $this->assertFalse(valid_pa_phone_number('320-43'), '320-43 should not be valid');
-    $this->assertTrue(valid_pa_phone_number('(507) 435-3434'), '(507) 435-3434 should not be valid');
-  }
-
-  function testFormattingPanamenianPhoneNumber() {
-    $this->assertEqual(format_pa_phone_number('+507 260-4334'), '+507 260-4334', '+507 260-4334 format');
-    $this->assertEqual(format_pa_phone_number('+507 2604334'), '+507 260-4334', '+507 2604334 format');
-    $this->assertEqual(format_pa_phone_number('+507 260 4334'), '+507 260-4334', '+507 260 4334 format');
-    $this->assertEqual(format_pa_phone_number('00507 260-4334'), '+507 260-4334', '00507 260-4334 format');
-    $this->assertEqual(format_pa_phone_number('00507 2604334'), '+507 260-4334', '00507 2604334 format');
-    $this->assertEqual(format_pa_phone_number('00507 260 4334'), '+507 260-4334', '00507 260 4334 format');
-    $this->assertEqual(format_pa_phone_number('260-4334'), '260-4334', '260-4334 format');
-    $this->assertEqual(format_pa_phone_number('2604334'), '260-4334', '2604334 format');
-    $this->assertEqual(format_pa_phone_number('260 4334'), '260-4334', '260 4334 format');
-
-    $this->assertEqual(format_pa_phone_number('260 4334', array('phone_country_code' => 1)), '+507 260-4334', 'add +507 to 260 4334 format');
-
-    //Cellphones
-    $this->assertEqual(format_pa_phone_number('00507 6464 4334'), '+507 6464-4334', '6464 4334 format');
-    $this->assertEqual(format_pa_phone_number('00507 6464-4334'), '+507 6464-4334', '00507 6464-4334 format');
-    $this->assertEqual(format_pa_phone_number('00507 64644334'), '+507 6464-4334', '00507 64644334 format');
-    $this->assertEqual(format_pa_phone_number('+507 6464 4334'), '+507 6464-4334', '+507 6464 4334 format');
-    $this->assertEqual(format_pa_phone_number('6464 4334'), '6464-4334', '6464 4334 format');
-    $this->assertEqual(format_pa_phone_number('64644334'), '6464-4334', '6464-4334 format');
-    $this->assertEqual(format_pa_phone_number('6464 4334', array('phone_country_code' => 1)), '+507 6464-4334', 'add +507 to 6464 4334 format');
-  }
-}
\ No newline at end of file
diff --git tests/phone-ph.test tests/phone-ph.test
deleted file mode 100644
index c2e8929..0000000
--- tests/phone-ph.test
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-class PHPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Philippine Phone number test'),
-      'description' => t('Tests various valid and invalid Philippine phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhonePHValid() {
-    //$this->assertTrue(valid_phone_number('ph', '04 476 0000'), t('Test standard regional number 04 476 0000'));
-  }
-
-  public function testPhonePHInvalid() {
-    //$this->assertFalse(valid_phone_number('ph', '021 3012 3456'), t('Test invalid 10-digit Vodafone number in wrong range 021 3012 3456'));
-  }
-
-  public function testPhonePHFormatting() {
-    //$this->assertEqual(format_phone_number('ph', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-pk.test tests/phone-pk.test
deleted file mode 100644
index b2fafc5..0000000
--- tests/phone-pk.test
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-class PKPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Pakistan Phone number test'),
-      'description' => t('Tests various valid and invalid Pakistan phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhonePKValid() {
-    $this->assertTrue(valid_phone_number('pk', '+92 321 7469854'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('pk', '923217469857'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('pk', '041 2680226'), t('Test valid'));
-  }
-
-  public function testPhonePKInvalid() {
-    $this->assertFalse(valid_phone_number('pk', '00124566'), t('Test invalid'));
-    $this->assertFalse(valid_phone_number('pk', '01 922 745689'), t('Test invalid'));
-    $this->assertFalse(valid_phone_number('pk', '0000000000'), t('Test invalid'));
-  }
-
-  public function testPhonePKFormatting() {
-    //$this->assertEqual(format_phone_number('pk', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-pl.test tests/phone-pl.test
deleted file mode 100644
index 0996f46..0000000
--- tests/phone-pl.test
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-class PLPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Poland Phone number test'),
-      'description' => t('Tests various valid and invalid Poland phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhonePLValid() {
-    $this->assertTrue(valid_phone_number('pl', '+48 500-080-100'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('pl', '500080100'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('pl', '500 080 100'), t('Test valid'));
-  }
-
-  public function testPhonePLInvalid() {
-    $this->assertFalse(valid_phone_number('pl', '+47 100-100-100'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('pl', '1000-100-100'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('pl', '1000000000'), t('Test invalid '));
-  }
-
-  public function testPhonePLFormatting() {
-    //$this->assertEqual(format_phone_number('pl', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-
-  }
-}
\ No newline at end of file
diff --git tests/phone-ru.test tests/phone-ru.test
deleted file mode 100644
index ea4109a..0000000
--- tests/phone-ru.test
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-class RUPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Russia Phone number test'),
-      'description' => t('Tests various valid and invalid Russia phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneRUValid() {
-    $this->assertTrue(valid_phone_number('ru', '+7(916)9985670'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('ru', '8-912-268-5440'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('ru', '8905148-3339'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('ru', '8(913)448-51-90'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('ru', '903-345-34-34'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('ru', '903-34-334-34'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('ru', '903-34-33434'), t('Test valid '));
-  }
-
-  public function testPhoneRUInvalid() {
-    $this->assertFalse(valid_phone_number('ru', '+33903-34-33434'), t('Test invalid '));
-  }
-
-  public function testPhoneRUFormatting() {
-    //$this->assertEqual(format_phone_number('ru', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-se.test tests/phone-se.test
deleted file mode 100644
index 2c5fde4..0000000
--- tests/phone-se.test
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-class SEPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Sweden Phone number test'),
-      'description' => t('Tests various valid and invalid Sweden phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneSEValid() {
-    $this->assertTrue(valid_phone_number('se', '+46 8 123 456 78'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('se', '08-123 456 78'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('se', '0123-456 78'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('se', '031-3224562'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('se', '0737234264'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('se', '073-5647829'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('se', '19740609-7845'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('se', '19811116-7845'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('se', '20010913-7598'), t('Test valid'));
-  }
-
-  public function testPhoneSEInvalid() {
-    $this->assertFalse(valid_phone_number('se', '46 08-123 456 78'), t('Test invalid'));
-    $this->assertFalse(valid_phone_number('se', '08 123 456 78'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('se', '0123 456 78'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('se', '34348abc'), t('Test invalid'));
-    $this->assertFalse(valid_phone_number('se', '452643242343432432435643623432'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('se', '532'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('se', '21003612-9999'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('se', '18790505-45458'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('se', '19740641-5559'), t('Test invalid '));
-  }
-
-  public function testPhoneSEFormatting() {
-    //$this->assertEqual(format_phone_number('se', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-sg.test tests/phone-sg.test
deleted file mode 100644
index 2ad8b88..0000000
--- tests/phone-sg.test
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-class SGPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Singapore Phone number test'),
-      'description' => t('Tests various valid and invalid Singapore phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneSGValid() {
-    $this->assertTrue(valid_phone_number('sg', '61234567'), "'61234567' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '63829324'), "'63829324' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '67654321'), "'67654321' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '+6561234567'), "'+6561234567' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '+6581234567'), "'+6581234567' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '+6591234567'), "'+6591234567' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '+65 61234567'), "'+65 61234567' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '+65 81234567'), "'+65 81234567' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '+65 91234567'), "'+65 91234567' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '61234567'), "'61234567' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '81234567'), "'81234567' should be valid");
-    $this->assertTrue(valid_phone_number('sg', '91234567'), "'91234567' should be valid");
-  }
-
-  public function testPhoneSGInvalid() {
-    $this->assertFalse(valid_phone_number('sg', '6123-4567'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('sg', '6-CALL-CPY'), t('Test invalid '));
-    $this->assertFalse(valid_phone_number('sg', '6123abcd'), t('Test invalid '));
-  }
-
-  public function testPhoneSGFormatting() {
-    //$this->assertEqual(format_phone_number('sg', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-ua.test tests/phone-ua.test
deleted file mode 100644
index d90d3ac..0000000
--- tests/phone-ua.test
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-class UAPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('Ukraine Phone number test'),
-      'description' => t('Tests various valid and invalid Ukraine phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-  
-  function setUp() {
-    parent::setUp();
-  }  
-
-  public function testPhoneUAValid() {
-    $this->assertTrue(valid_phone_number('ua', '+38-044-283-93-57'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('ua', '(044)2839357'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('ua', '+380442839357'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('ua', '+38 (044)537-28-07'), t('Test valid'));
-    $this->assertTrue(valid_phone_number('ua', '8044223-95-26'), t('Test valid'));
-
-  }
-
-  public function testPhoneUAInvalid() {
-    $this->assertFalse(valid_phone_number('ua', '+380612839357'), t('Test invalid '));
-  }
-
-  public function testPhoneUAFormatting() {
-    //$this->assertEqual(format_phone_number('ua', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
\ No newline at end of file
diff --git tests/phone-uk.test tests/phone-uk.test
deleted file mode 100644
index 2470a39..0000000
--- tests/phone-uk.test
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-class UKPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('UK Phone number test'),
-      'description' => t('Tests various valid and invalid UK phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneUKValid() {
-    $this->assertTrue(valid_phone_number('uk', '01905 23819'), t('Test valid - 01905 23819'));
-    $this->assertTrue(valid_phone_number('uk', '01222 555 555'), t('Test valid - 01222 555 555'));
-    $this->assertTrue(valid_phone_number('uk', '(010) 55555555 #2222'), t('Test valid - (010) 55555555 #2222'));
-    $this->assertTrue(valid_phone_number('uk', '0122 555 5555#222'), t('Test valid - 0122 555 5555#222'));
-    $this->assertTrue(valid_phone_number('uk', '+441970123456'), t('Test valid - +441970123456'));
-    $this->assertTrue(valid_phone_number('uk', '+44(0)1970123456'), t('Test valid - +44(0)1970123456'));
-    $this->assertTrue(valid_phone_number('uk', '+44 1970 123 4562'), t('Test valid - +44 1970 123 456'));
-    $this->assertTrue(valid_phone_number('uk', '+44 (0)1970 123 456'), t('Test valid - +44 (0)1970 123 456'));
-    $this->assertTrue(valid_phone_number('uk', '(01970) 123456 #0001'), t('Test valid - (01970) 123456 #0001')); 
-  }
-
-  public function testPhoneUKInvalid() {
-    $this->assertFalse(valid_phone_number('uk', '01222 555 5555'), t('Test invalid - 01222 555 5555'));
-    $this->assertFalse(valid_phone_number('uk', '(010) 55555555 #22'), t('Test invalid - (010) 55555555 #22'));
-    $this->assertFalse(valid_phone_number('uk', '0122 5555 5555#222'), t('Test invalid - 0122 5555 5555#222'));
-    $this->assertFalse(valid_phone_number('uk', '(+441970)123456'), t('Test invalid - (+441970)123456'));
-    $this->assertFalse(valid_phone_number('uk', '+44(1970)123456'), t('Test invalid - +44(1970)123456'));
-    $this->assertFalse(valid_phone_number('uk', '+44 01970 123 456'), t('Test invalid - +44 01970 123 456'));
-    $this->assertFalse(valid_phone_number('uk', '(0197) 0123456 #01'), t('Test invalid - (0197) 0123456 #01')); 
-  }
-
-  public function testPhoneUKFormatting() {
-    //$this->assertEqual(format_phone_number('uk', '+6421123456', null), '+64 21 123 456', t('Check international mobile format'));
-  }
-}
diff --git tests/phone-za.test tests/phone-za.test
deleted file mode 100644
index 535148e..0000000
--- tests/phone-za.test
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-class ZAPhoneNumberTestCase extends DrupalWebTestCase {
-  /**
-   * Implementation of getInfo()
-   *
-   */
-  public static function getInfo() {
-    return array(
-      'name' => t('South Africa Phone number test'),
-      'description' => t('Tests various valid and invalid South African phone numbers for validity'),
-      'group' => t('Phone')
-    );
-  }
-
-  public function testPhoneZAValid() {
-    $this->assertTrue(valid_phone_number('za', '+27 11 888-8888'), t('Test valid - +27 11 888-8888'));
-    $this->assertTrue(valid_phone_number('za', '0333872119'), t('Test valid - 0333872119'));
-    $this->assertTrue(valid_phone_number('za', '074 101 2850'), t('Test valid - 074 101 2850'));
-    $this->assertTrue(valid_phone_number('za', '27723376484'), t('Test valid - 27723376484'));
-    $this->assertTrue(valid_phone_number('za', '0723376484'), t('Test valid - 0723376484'));
-    $this->assertTrue(valid_phone_number('za', '0111231234'), t('Test valid - 0111231234'));
-    $this->assertTrue(valid_phone_number('za', '011 123 1234'), t('Test valid - 011 123 1234'));
-    $this->assertTrue(valid_phone_number('za', '011-123-1234'), t('Test valid - 011-123-1234'));
-    $this->assertTrue(valid_phone_number('za', '0821231234'), t('Test valid - 0821231234'));
-    $this->assertTrue(valid_phone_number('za', '082 123 1234'), t('Test valid - 082 123 1234'));
-    $this->assertTrue(valid_phone_number('za', '+27821231234'), t('Test valid - +27821231234'));
-    $this->assertTrue(valid_phone_number('za', '+2782-123-1234'), t('Test valid - +2782-123-1234'));
-    $this->assertTrue(valid_phone_number('za', '+2782 123 1234'), t('Test valid - +2782 123 1234'));
-    $this->assertTrue(valid_phone_number('za', '27111231234'), t('Test valid - 27111231234'));
-    $this->assertTrue(valid_phone_number('za', '2711 123 1234'), t('Test valid - 2711 123 1234'));
-    $this->assertTrue(valid_phone_number('za', '082 123 1234'), t('Test valid - 082 123 1234'));
-  }
-
-  public function testPhoneZAInvalid() {
-    $this->assertFalse(valid_phone_number('za', '9723376484'), t('Test invalid - 9723376484'));
-    $this->assertFalse(valid_phone_number('za', '26723376484'), t('Test invalid - 26723376484'));
-    $this->assertFalse(valid_phone_number('za', '(011)1231234'), t('Test invalid - (011)1231234'));
-    $this->assertFalse(valid_phone_number('za', '(+2711) 123 1234'), t('Test invalid - (+2711) 123 1234'));
-    $this->assertFalse(valid_phone_number('za', '(011) 123-1234'), t('Test invalid - (011) 123-1234'));
-  }
-
-  public function testPhoneZAFormatting() {
-    $this->assertEqual(format_phone_number('za', '082 123 1234', null), '082 123 1234', 'Formatting OK "082 123 1234" --> "082 123 1234"');
-  }
-}
\ No newline at end of file
diff --git tests/phone.int.test tests/phone.int.test
index f643c6a..219c297 100644
--- tests/phone.int.test
+++ tests/phone.int.test
@@ -1,19 +1,22 @@
 <?php
 
-require_once drupal_get_path('module', 'phone') . '/phone.int.inc';
+//require_once drupal_get_path('module', 'phone') . 'includes/phone.int.inc';
 
-class PhoneIntTest extends DrupalTestCase
-{
+class PhoneIntTest extends DrupalWebTestCase {
 
-  function get_info() {
+  public static function getInfo() {
     return array(
-      'name'  => t('International phone number test'),
-      'desc'  => t('Tests international phone number validation.'),
-      'group' => t('Phone module'),
+      'name'  => 'International phone number test',
+      'description'  => 'Tests international phone number validation.',
+      'group' => 'Phone',
     );
   }
-
-  function assertConversion($input, $expect = TRUE, $field = array(), $expect_error = FALSE) {
+  public function setUp() {
+    // Enable the phone module.
+    parent::setUp(array('phone'));
+  }
+  
+  private function assertConversion($input, $expect = TRUE, $field = array(), $expect_error = FALSE) {
     $error = FALSE;
     if (!isset($field['phone_int_max_length'])) {
       $field['phone_int_max_length'] = '15';
@@ -22,67 +25,67 @@ class PhoneIntTest extends DrupalTestCase
       $field['phone_default_country_code'] = '1';
     }
     if ($expect === FALSE) {
-      $this->assertFalse(valid_int_phone_number($input, $field, $error));
+      $this->assertFalse(valid_phone_number('int', $input, $field, $error));
       $this->assertIdentical($error, $expect_error);
       return;
     }
     elseif ($expect === TRUE) {
       $expect = $input;
     }
-    $this->assertTrue(valid_int_phone_number($input, $field, $error));
+    $this->assertTrue(valid_phone_number('int', $input, $field, $error));
     $this->assertIdentical($error, FALSE);
-    $result = format_int_phone_number($input, $field);
+    $result = format_phone_number('int', $input, $field);
     $this->assertIdentical($result, $expect);
   }
 
-  function testBasic() {
+  public function testBasic() {
     $this->assertConversion('+1 7329018493');
   }
 
-  function testBasicWithThreeCountryCode() {
+  public function testBasicWithThreeCountryCode() {
     $this->assertConversion('+672 565434');
   }
 
-  function testBasicWithFourCountryCode() {
+  public function testBasicWithFourCountryCode() {
     $this->assertConversion('+6724 565434', FALSE, array(), array(
       'Invalid international phone number: Country code "+%cc" is too long; valid country codes are three digits or less.',
       array('%cc' => '6724')
     ));
   }
 
-  function testBasicWithSpaces() {
+  public function testBasicWithSpaces() {
     $this->assertConversion('+1 732 901 8493');
   }
 
-  function testBasicNormalizeOtherCharacters() {
+  public function testBasicNormalizeOtherCharacters() {
     $this->assertConversion('+1 (732) 901-8493', '+1 732 901 8493');
   }
 
-  function testRemoveNDD() {
+  public function testRemoveNDD() {
     $this->assertConversion('+54 0435344', '+54 435344');
   }
 
-  function testRemoveNonStandardNDD() {
+  public function testRemoveNonStandardNDD() {
     $this->assertConversion('+374 (8) 435344', '+374 435344');
   }
 
-  function testAddCountryCode() {
+  public function testAddCountryCode() {
     $this->assertConversion('732 343 2333', '+1 732 343 2333', array('phone_default_country_code' => '1'));
   }
 
-  function testOverlongNumber() {
+  public function testOverlongNumber() {
     $this->assertConversion('+123 456 789 012 3456', FALSE, array(),
       'Invalid international phone number: Phone number is too long; international phone numbers are limited to 15 digits.'
     );
   }
 
-  function testOverlongNumberWithoutCountryCode() {
+  public function testOverlongNumberWithoutCountryCode() {
     $this->assertConversion('456 789 012 3456', FALSE, array('phone_default_country_code' => '123'),
       'Invalid international phone number: Phone number is too long; international phone numbers are limited to 15 digits.'
     );
   }
 
-  function testLetters() {
+  public function testLetters() {
     $this->assertConversion('+1 343 CALL US', FALSE, array(),
       'Invalid international phone number: Phone number contains invalid characters; only allowed characters are numbers and punctuation.'
     );
