diff --git a/ascii_art_captcha/ascii_art_captcha.admin.inc b/ascii_art_captcha/ascii_art_captcha.admin.inc
index 32ccd46..7272a51 100644
--- a/ascii_art_captcha/ascii_art_captcha.admin.inc
+++ b/ascii_art_captcha/ascii_art_captcha.admin.inc
@@ -1,6 +1,11 @@
 <?php
 
 /**
+ * @file
+ * Functionality and helper functions for ASCII ART CAPTCHA administration.
+ */
+
+/**
  * Function for the settings form
  */
 function ascii_art_captcha_settings_form() {
@@ -9,7 +14,7 @@ function ascii_art_captcha_settings_form() {
   $form['ascii_art_captcha_code_length'] = array(
     '#type' => 'select',
     '#title' => t('Code length'),
-    '#options' => array(4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10),
+    '#options' => drupal_map_assoc(array(4, 5, 6, 7, 8, 9, 10)),
     '#default_value' => (int) variable_get('ascii_art_captcha_code_length', 6),
   );
   $form['ascii_art_captcha_font'] = array(
@@ -22,27 +27,27 @@ function ascii_art_captcha_settings_form() {
   // font size
   $font_sizes = array(0 => t('default'));
   foreach (array(4, 6, 8, 9, 10, 11, 12) as $pt) {
-    $font_sizes[$pt] = $pt .'pt';
+    $font_sizes[$pt] = $pt . 'pt';
   }
   $form['ascii_art_captcha_font_size'] = array(
     '#type' => 'select',
     '#title' => t('Font size'),
     '#options' => $font_sizes,
-    '#default_value' => variable_get('ascii_art_captcha_font_size', 0),
+    '#default_value' => (int) variable_get('ascii_art_captcha_font_size', 0),
     '#description' => t('Set the font size for the ASCII art.'),
   );
   $form['ascii_art_captcha_allowed_characters'] = array(
     '#type' => 'checkboxes',
-    '#title' => 'Character sets to use',
+    '#title' => t('Character sets to use'),
     '#options' => array(
       'upper' => t('upper case characters'),
       'lower' => t('lower case characters'),
       'digit' => t('digits'),
     ),
-    '#default_value' => variable_get('ascii_art_captcha_allowed_characters', array('upper' => 'upper', 'lower' => 'lower', 'digit' => 'digit')),
+    '#default_value' => variable_get('ascii_art_captcha_allowed_characters', drupal_map_assoc(array('upper', 'lower', 'digit'))),
     '#description' => t('Enable the character sets to use in the code. Choose wisely by taking the recognizability of the used font into account.'),
   );
-  $form['#validate'] = array('ascii_art_captcha_settings_form_validate');
+  $form['#validate'][] = 'ascii_art_captcha_settings_form_validate';
   return system_settings_form($form);
 }
 
@@ -56,17 +61,18 @@ function ascii_art_captcha_settings_form_validate($form, &$form_state) {
 }
 
 /**
- * function to get a list of available fonts
+ * Function to get a list of available fonts
  */
 function _ascii_art_captcha_available_fonts() {
   $available_fonts = array();
-  $fontsdirectory = drupal_get_path('module', 'ascii_art_captcha') .'/fonts';
-  $pattern = 'ascii_art_captcha_font_([a-zA-Z0-9]+)\.[iI][nN][cC]$';
-  foreach (file_scan_directory($fontsdirectory, $pattern) as $filename => $font) {
+  $fontsdirectory = drupal_get_path('module', 'ascii_art_captcha') . '/fonts';
+  $pattern = '/ascii_art_captcha_font_([a-zA-Z0-9]+)\.[iI][nN][cC]$/';
+  $directory_files = file_scan_directory($fontsdirectory, $pattern);
+  foreach ($directory_files as $font) {
     $regs = array();
-    ereg($pattern, $font->basename, $regs);
+    preg_match($pattern, $font->filename, $regs);
     $available_fonts[$regs[1]] = $regs[1];
   }
   asort($available_fonts);
   return $available_fonts;
-}
+}
\ No newline at end of file
diff --git a/ascii_art_captcha/ascii_art_captcha.info b/ascii_art_captcha/ascii_art_captcha.info
index 82d2e68..61e2852 100644
--- a/ascii_art_captcha/ascii_art_captcha.info
+++ b/ascii_art_captcha/ascii_art_captcha.info
@@ -1,5 +1,11 @@
-name = "ASCII art CAPTCHA"
-description = "Provides an ASCII art based CAPTCHA type."
+name = ASCII art CAPTCHA
+description = Provides an ASCII art based CAPTCHA type.
 package = "Spam control"
+core = 7.x
+configure = admin/config/people/captcha/ascii_art_captcha
+
 dependencies[] = captcha
-core = 6.x
+
+files[] = ascii_art_captcha.admin.inc
+files[] = ascii_art_captcha.install
+files[] = ascii_art_captcha.module
diff --git a/ascii_art_captcha/ascii_art_captcha.install b/ascii_art_captcha/ascii_art_captcha.install
index 295fde0..8f2ca5c 100644
--- a/ascii_art_captcha/ascii_art_captcha.install
+++ b/ascii_art_captcha/ascii_art_captcha.install
@@ -1,7 +1,13 @@
 <?php
 
 /**
- * On uninstall: remove module variables and clear variable cache
+ * @file
+ * Install, update and uninstall functions for the ASCII ART CAPTCHA module.
+ */
+
+/**
+ * Implementation of hook_uninstall().
+ * On uninstall: remove module variables and clear variables cache
  */
 function ascii_art_captcha_uninstall() {
   db_query("DELETE FROM {variable} WHERE name LIKE 'ascii_art_captcha_%'");
diff --git a/ascii_art_captcha/ascii_art_captcha.module b/ascii_art_captcha/ascii_art_captcha.module
index f450c17..ab94d5d 100644
--- a/ascii_art_captcha/ascii_art_captcha.module
+++ b/ascii_art_captcha/ascii_art_captcha.module
@@ -5,10 +5,10 @@
  */
 function ascii_art_captcha_help($path, $arg) {
   switch ($path) {
-    case 'admin/user/captcha/ascii_art_captcha':
-      $output = '<p>'. t('The ASCII art CAPTCHA shows a random character code in ASCII art style. Example with current settings:') .'</p>';
+    case 'admin/config/people/captcha/ascii_art_captcha':
+      $output = '<p>' . t('The ASCII art CAPTCHA shows a random character code in ASCII art style. Example with current settings:') . '</p>';
       $captcha = ascii_art_captcha_captcha('generate', 'ASCII art CAPTCHA');
-      $output .= $captcha['form']['ascii']['#value'];
+      $output .= $captcha['form']['ascii']['#markup'];
       return $output;
   }
 }
@@ -18,7 +18,7 @@ function ascii_art_captcha_help($path, $arg) {
  */
 function ascii_art_captcha_menu() {
   $items = array();
-  $items['admin/user/captcha/ascii_art_captcha'] = array(
+  $items['admin/config/people/captcha/ascii_art_captcha'] = array(
     'title' => 'ASCII art CAPTCHA',
     'file' => 'ascii_art_captcha.admin.inc',
     'page callback' => 'drupal_get_form',
@@ -34,7 +34,7 @@ function ascii_art_captcha_menu() {
  */
 function _ascii_art_captcha_get_allowed_characters() {
   $allowed_chars = array();
-  $allowed_chars_settings = variable_get('ascii_art_captcha_allowed_characters', array('upper' => 'upper', 'lower' => 'lower', 'digit' => 'digit'));
+  $allowed_chars_settings = variable_get('ascii_art_captcha_allowed_characters', drupal_map_assoc(array('upper', 'lower', 'digit')));
   if ($allowed_chars_settings['upper']) {
     $allowed_chars = array_merge($allowed_chars, array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'));
   }
@@ -48,9 +48,9 @@ function _ascii_art_captcha_get_allowed_characters() {
 }
 
 /**
- * Implementation of hook_captcha
+ * Implementation of hook_captcha().
  */
-function ascii_art_captcha_captcha($op, $captcha_type='', $response='') {
+function ascii_art_captcha_captcha($op, $captcha_type = '') {
   switch ($op) {
     case 'list':
       return array('ASCII art CAPTCHA');
@@ -78,7 +78,7 @@ function ascii_art_captcha_captcha($op, $captcha_type='', $response='') {
           $character = $allowed_chars[array_rand($allowed_chars)];
           $solution .= $character;
           foreach ($font[$character] as $l => $cline) {
-            $ascii_lines[$l] .= ' '. check_plain($cline);
+            $ascii_lines[$l] .= ' ' . check_plain($cline);
           }
         }
         // build CAPTCHA array
@@ -89,8 +89,7 @@ function ascii_art_captcha_captcha($op, $captcha_type='', $response='') {
           $style .= 'font-size:'. variable_get('ascii_art_captcha_font_size', 0) .'pt;';
         }
         $captcha['form']['ascii'] = array(
-          '#type' => 'markup',
-          '#value' => '<pre class="ascii_art_captcha" style="'. $style .'">'. implode('<br />', $ascii_lines) .'</pre>',
+          '#markup' => '<pre class="ascii_art_captcha" style="' . $style . '">' . implode('<br />', $ascii_lines) . '</pre>',
         );
         $captcha['form']['captcha_response'] = array(
           '#type' => 'textfield',
