Rewrited following Drupal coding standards