diff --git tooltips.css tooltips.css
index 0345207..c0eaaec 100644
--- tooltips.css
+++ tooltips.css
@@ -1,29 +1,31 @@
+/** $Id$ **/
+
 a.tooltip {
-	position: relative;
-	text-decoration: none;
-	border-bottom: 1px dashed #aaa;
-	cursor: default;
+  position: relative;
+  text-decoration: none;
+  border-bottom: 1px dashed #aaa;
+  cursor: default;
 }
 
 a.tooltip span {
-	display: none;
+  display: none;
 }
 
 a.tooltip:hover {
-	z-index: 100;
-	background: transparent; /* must be set for ie6 */
-	text-decoration: none;
+  z-index: 100;
+  background: transparent; /* must be set for ie6 */
+  text-decoration: none;
 }
 
 a.tooltip:hover span {
-	display: block;
-	position: absolute; 
-	top: 1.4em;
-	left: 0;
-	width: 200px;
-	padding: 0.3em;
-	text-align: center;
-	background: #ffd;
-	border: 1px solid black;
-	color: black;
+  display: block;
+  position: absolute;
+  top: 1.4em;
+  left: 0;
+  width: 200px;
+  padding: 0.3em;
+  text-align: center;
+  background: #ffd;
+  border: 1px solid black;
+  color: black;
 }
diff --git tooltips.info tooltips.info
index b7ef1c0..d5d3707 100644
--- tooltips.info
+++ tooltips.info
@@ -1,10 +1,9 @@
-; $Id
-name = Tool Tips 
-description = Filter for adding tool tips to text 100% CSS
-package = "Input filters"
-
-version = "6.x-1.0"
-core = "6.x"
-project = "tooltips"
+; $Id$
 
+name = Tool Tips
+description = Filter for adding tool tips to text 100% CSS
+package = Text formats
+core = 7.x
+files[] = tooltips.module
+stylesheets[all][] = tooltips.css
 
diff --git tooltips.module tooltips.module
index 2d719d9..ff78a22 100644
--- tooltips.module
+++ tooltips.module
@@ -1,60 +1,62 @@
 <?php
-// $Id:
+// $Id$
 
 /**
- * Implementation of hook_filter_tips()
+ * @file
+ * Provide tooltips for links.
  */
-function tooltips_filter_tips($delta, $format, $long = false) {
-  if ($long) {
-    return t("To add pop-up tool tips to your content's text, enable Tool Tips in the Input Filter configure section of your default filter. To use add [tip:Text to highlight=The tooltip's content] to your node body as many times as you like!");
-  }
-  else {
-    return t("Add tooltips to text. Usage [tip:Text to highlight=The tooltip's content]");
-  }
+
+/**
+ * Implementation of hook_theme().
+ */
+function tooltips_theme() {
+  return array(
+    'tooltips_tooltip' => array(
+      'variables' => array('link' => '', 'tip' => ''),
+    ),
+  );
 }
 
 /**
- * Implementation of hook_init()
- * Adds the tooltips stylesheet to the page
+ * Helper function to render tooltips.
  */
-function tooltips_init() {
-  if(function_exists('drupal_add_css')) // If not caching
-    drupal_add_css(drupal_get_path('module', 'tooltips') .'/tooltips.css', 'module', 'all', TRUE);
+function theme_tooltips_tooltip($variables) {
+  return '<a href="javascript:;" class="tooltip">' . $variables['link']. '<span>' . $variables['tip'] . '</span></a>';
 }
 
+/**
+ * Process tooltips tags converting they on html anchors.
+ */
 function _tooltips_substitute($text) {
   if (preg_match_all("/\[tip:([^=\\]]+)\=?([^\\]]*)?\]/i", $text, $match)) {
     foreach ($match[2] as $key => $value) {
-      $link = $match[1][$key];
-      $tip = $match[2][$key];
+      $variables = array(
+        'link' => $match[1][$key],
+        'tip' => $match[2][$key],
+      );
       $search[] = $match[0][$key];
-      $replace[] = '<a href="javascript:;" class="tooltip">' . $link 
-                    . '<span>'. $tip .'</span></a>';
-   }
-   return str_replace($search, $replace, $text);
- }
-return $text;
+      $replace[] = theme('tooltips_tooltip', $variables);
+    }
+    return str_replace($search, $replace, $text);
+  }
+  return $text;
 }
 
 /**
- * Implementation of hook_filter()
+ * Implements hook_filter_info().
  */
-function tooltips_filter($op, $delta = 0, $format = -1, $text = '') {
-  switch ($op) {
-    case 'list':
-      return array(0 => t('Tool Tips'));
-
-    case 'description':
-      return t("Add tooltips to text. Usage [tip:Text to highlight=The tooltip's content]");
-
-    case 'prepare':
-      return $text;
-
-    case 'process':
-      $text = _tooltips_substitute($text);
-      return $text;
+function tooltips_filter_info() {
+  $filters['tooltips'] = array(
+    'title' => t('Tool tips'),
+    'process callback' => '_tooltips_substitute',
+    'tips callback' => '_tooltips_tips',
+  );
+  return $filters;
+}
 
-    default:
-      return $text;
-  }
+/**
+ * Filter tips callback for tooltips filter.
+ */
+function _tooltips_tips($filter, $format, $long = FALSE) {
+  return t("Add tooltips to text. Usage [tip:Text to highlight=The tooltip's content]");
 }
