diff --git a/imagex.info b/imagex.info
index b90c398..2e75334 100644
--- a/imagex.info
+++ b/imagex.info
@@ -3,9 +3,4 @@ name = Imagex
 description = Extends the basic image functionality to make multiple file upload and annotation easier
 package = Image
 
-
-; Information added by drupal.org packaging script on 2007-11-19
-version = "5.x-1.0"
-project = "imagex"
-datestamp = "1195492505"
-
+core = 6.x
diff --git a/imagex.install b/imagex.install
deleted file mode 100644
index ab470e8..0000000
--- a/imagex.install
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-// $Id: imagex.install,v 1.5 2008/07/30 10:36:42 sdrycroft Exp $
-function imagex_update_1(){
-  // Remove the imagex table which isn't actually needed (we can use created/updated/uid from the node table)
-  $updates = array();
-  $updates[] = update_sql("DROP TABLE {imagex}");
-  return $updates;
-}
\ No newline at end of file
diff --git a/imagex.module b/imagex.module
index eea6103..caec7de 100644
--- a/imagex.module
+++ b/imagex.module
@@ -1,71 +1,81 @@
 <?php
 // $Id: imagex.module,v 1.7 2008/12/20 22:09:24 sdrycroft Exp $
+/**
+ * @file
+ * Imagex module will allow users to upload multiple images.
+ */
+
 
 /**
  * This is a complete rewrite of the imagex module.  The module
  * allows a user to upload multiple images in one simple step.
- * The module also provides an editing interface that makes 
+ * The module also provides an editing interface that makes
  * editing a large number of images also much easier.
  */
-/***********************************************************************************
+/**
  * HOOKS
- ***********************************************************************************/
-function imagex_menu($may_cache) {
+ */
+function imagex_menu() {
   $items = array();
 
-  if ($may_cache) {
-    $items[] = array(
-      'path' => 'imagex/upload',
-      'access' => user_access('create images'),
-      'title' => t('Imagex upload'),
-      'callback' => 'imagex_upload_image',
-      'type' => MENU_CALLBACK);
-    $items[] = array(
-      'path' => 'imagex/get',
-      'title' => t('Imagex thumbs'),
-      'access' => user_access('create images'),
-      'type' => MENU_CALLBACK,
-      'callback' => 'imagex_js'
-    );
-    $items[] = array(
-      'path' => 'imagex/imagex',
-      'title' => t('Upload images'),
-      'access' => user_access('create images'),
-      'type' => MENU_CALLBACK,
-      'callback' => 'imagex_upload_page'
-    );
-  }
+  $items['imagex/upload'] = array(
+    'access arguments'  => array('create images'),
+    'title'             => 'Imagex upload',
+    'page callback'     => 'imagex_upload_image',
+    'type'              => MENU_CALLBACK,
+  );
+
+  $items['imagex/get'] = array(
+    'title'             => 'Imagex thumbs',
+    'access arguments'  => array('create images'),
+    'type'              => MENU_CALLBACK,
+    'page callback'     => 'imagex_js'
+  );
+
+  $items['imagex/imagex'] = array(
+    'title'             => 'Upload images',
+    'access arguments'  => array('create images'),
+    'type'              => MENU_CALLBACK,
+    'page callback'     => 'imagex_upload_page'
+  );
+
   return $items;
 }
-function imagex_form_alter($form_id, &$form){
-  // Lets add a small message to the top of the node/add/image form to point to the 
-  // multiple add image page
-  if($form_id == 'image_node_form'){
-    $form['imagex'] = array(
-      '#weight' => -100, // make sure it is at the top
-      '#value' => '<div class="messages"><p>'.t('You can add multiple images quickly to the site from the <a href="@uploadpage">multiple upload page</a>', array('@uploadpage'=>url('imagex/imagex'))).'</p></div>'
-    );
-  }
-}
-/***********************************************************************************
+
+/**
+ * Add a small message to the top of the node/add/image form to point to the multiple
+ *  add image page
+ *
+ * @return void
+ * @author Craig Gardner
+ */
+function imagex_form_image_node_form_alter(&$form, &$form_state) {
+  $form['imagex'] = array(
+    '#weight' => -100, // make sure it is at the top
+    '#value'  => '<div class="messages"><p>'. t('You can add multiple images quickly to the site from the <a href="@uploadpage">multiple upload page</a>', array('@uploadpage' => url('imagex/imagex'))) .'</p></div>',
+  );
+} // end function imagex_form_image_node_form_alter()
+
+/**
  * CALLBACKS
- ***********************************************************************************/
+ */
+
 /**
  * Callback for the imagex/imagex page which simply displays the applet for uploading
  * of images
  *
  * @return String (Contains HTML for displaying of the applet)
  */
-function imagex_upload_page(){
+function imagex_upload_page() {
   // If we're lookin' at this page, then chuffin heck, we need t'JavaScript & CSS
-  drupal_add_js(drupal_get_path('module','imagex').'/imagex.js');
-  drupal_add_css(drupal_get_path('module','imagex').'/imagex.css');
-  return '<div class="messages imagex header"><p>'.t('Drop images into the box below, or click the "Add" button, and select the images you\'d like to upload').'</p></div><div class="imagex postlet">
-	<applet name="postlet" code="Main.class" archive="'.base_path().drupal_get_path('module','imagex').'/postlet/postlet.jar" width="100%" height="300" mayscript>
+  drupal_add_js(drupal_get_path('module', 'imagex') .'/imagex.js');
+  drupal_add_css(drupal_get_path('module', 'imagex') .'/imagex.css');
+  return '<div class="messages imagex header"><p>'. t('Drop images into the box below, or click the "Add" button, and select the images you\'d like to upload') .'</p></div><div class="imagex postlet">
+	<applet name="postlet" code="Main.class" archive="'. base_path() . drupal_get_path('module', 'imagex') .'/postlet/postlet.jar" width="100%" height="300" mayscript>
 		<param name = "maxthreads"		value = "5" />
 		<param name = "language"		value = "EN" />
 		<param name = "type"			value = "application/x-java-applet;version=1.3.1" />
-		<param name = "destination"		value = "'.url('imagex/upload',NULL,NULL,TRUE).'" />
+		<param name = "destination"		value = "'. url('imagex/upload', array('absolute' => TRUE)) .'" />
 		<param name = "backgroundcolour" value = "16777215" />
 		<param name = "tableheaderbackgroundcolour" value = "14079989" />
 		<param name = "tableheadercolour" value = "0" />
@@ -78,7 +88,7 @@ function imagex_upload_page(){
 		<param name = "fileextensions" value = "Image Files,jpg,gif,jpeg,bmp,png" />
 	</applet>
 	<script type="text/javascript">
-	  imagesreturnurl ="'.url('imagex/get','','',TRUE).'";
+	  imagesreturnurl ="'. url('imagex/get', array('absolute' => TRUE)) .'";
 	</script>
 </div>
 <div id="imagexthumbs" class="imagex thumbs"></div>';
@@ -87,10 +97,10 @@ function imagex_upload_page(){
  * Callback for the upload destination.  This is where images are sent to by the applet.
  * This page is NOT designed to be viewed by humans/browsers.
  */
-function imagex_upload_image(){
+function imagex_upload_image() {
   global $user;
   // Output a postlet error if the user isn't allowed to upload.
-  if (!user_access('create images')){
+  if (!user_access('create images')) {
     ?>
 POSTLET REPLY
 POSTLET:NO
@@ -100,20 +110,21 @@ END POSTLET REPLY
     <?php
     exit;
   }
+
   else {
-    // User is allowed to upload, well lets do it    
+    // User is allowed to upload, well lets do it
     $uploaded = 0;
     // The image module doesn't rename the files when it moves them, so we need to do that first
-    $temp_filename = dirname($_FILES['userfile']['tmp_name']).'/'.$_FILES['userfile']['name'];
-    file_move($_FILES['userfile']['tmp_name'],$temp_filename);
+    $temp_filename = dirname($_FILES['userfile']['tmp_name']) .'/'. $_FILES['userfile']['name'];
+    file_move($_FILES['userfile']['tmp_name'], $temp_filename);
     $image_node = image_create_node_from($temp_filename, $_FILES['userfile']['name']);
-    if (!$image_node){
+    if (!$image_node) {
       // Lets work out why it wasn't uploaded and change the error accordingly.
-      
+
       // For now we'll say this type isn't allowed
       $uploaded = 2;
     }
-    switch($uploaded){
+    switch ($uploaded) {
       case 0:
         ?>
 POSTLET REPLY
@@ -147,7 +158,7 @@ POSTLET:SERVER ERROR
 POSTLET:ABORT ALL
 END POSTLET REPLY
         <?php
-        break;        
+        break;
     }
   }
   exit;
@@ -155,32 +166,33 @@ END POSTLET REPLY
 /**
  * Menu callback, ajax call to populate the page with the thumbnails
  */
-function imagex_js(){
+function imagex_js() {
   // Reurns HTML as JS for the thumbs of images uploaded
   // Does this for the user logged in only
-  print drupal_to_js(array('html' => '<p>'.t('The following images have been uploaded by you in the last hour').'</p>'.imagex_get_thumbs_html(60)));
+  print drupal_to_js(array('html' => '<p>'. t('The following images have been uploaded by you in the last hour') .'</p>'. imagex_get_thumbs_html(60)));
   exit();
 }
-/***********************************************************************************
+/**
  * HELPER FUNCTIONS
- ***********************************************************************************/
+ */
 /**
  * Following gets an HTML formatted list of images that the current user has uploaded,
  * and not edited.  It can also optionally show only images uploaded in the last x minutes
  *
  * @return String (Formatted HTML)
  */
-function imagex_get_thumbs_html($minutes = NULL){
+function imagex_get_thumbs_html($minutes = NULL) {
   global $user;
-  if(is_null($minutes)){
-    $result = db_query("SELECT nid FROM {node} WHERE uid = %d AND created=changed AND type='image'",$user->uid);
-  }else{
-    $result = db_query("SELECT nid FROM {node} WHERE uid = %d AND created=changed AND type='image' AND created>%d",$user->uid , time()-($minutes*60));
+  if (is_null($minutes)) {
+    $result = db_query("SELECT nid FROM {node} WHERE uid = %d AND created=changed AND type='image'", $user->uid);
+  }
+  else {
+    $result = db_query("SELECT nid FROM {node} WHERE uid = %d AND created=changed AND type='image' AND created>%d", $user->uid, time()-($minutes*60));
   }
   $html = '';
-  while($node = db_fetch_object($result)){
+  while ($node = db_fetch_object($result)) {
     $node = node_load($node->nid);
-    $html .= '<div class="imagexthumb" id="imagexthumb-'.$node->nid.'" onclick="imagexclick(\''.$node->nid.'\');">'.image_display($node,  $label = IMAGE_THUMBNAIL, array('alt'=>$node->title)).'</div>';
+    $html .= '<div class="imagexthumb" id="imagexthumb-'. $node->nid .'" onclick="imagexclick(\''. $node->nid .'\');">'. image_display($node, $label = IMAGE_THUMBNAIL, array('alt' => $node->title)) .'</div>';
   }
   return $html;
 }
\ No newline at end of file
