diff --git a/registrar_api.admin.inc b/registrar_api.admin.inc
index c4bf76f..a5bf1fe 100644
--- a/registrar_api.admin.inc
+++ b/registrar_api.admin.inc
@@ -14,10 +14,12 @@ function registrar_api_settings_form() {
     '#title' => t('Available TLDs'),
     '#collapsed' => TRUE,
     '#collapsible' => TRUE,
-    '#description' => t('Select the supported TLDs'),
   );
 
-  if (!$tlds) {
+  if ($tlds) {
+    $form['iana']['#description'] = t('Select the supported TLDs');
+  }
+  else {
     $form['iana']['#collapsed'] = FALSE;
     $form['iana']['msg'] = array(
       '#value' => t('To start using registrar API it\'s needed to download the TLDs database from <a href="@url">@url</a>', array('@url' => REGISTRAR_API_IANA_TLDS_URL)),
@@ -44,48 +46,52 @@ function registrar_api_settings_form() {
     '#value' => $tlds_enabled,
   );
 
-  $form['registrars'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Select registrars'),
-    '#description' => t('Select the registrar to use by default and optionally a specific registrar per TLD.'),
-    '#collapsible' => TRUE,
-  );
+  // Select default registrar and associate to each TLD.
   $registrars = registrar_api_get_registrars();
   if (empty($registrars)) {
     drupal_set_message(t('You must enable a <a href="@modules">registrar module</a> to make use of the registrar_api.', array('@modules' => url('admin/build/modules'))), 'warning');
   }
-  $options = array();
-  foreach ($registrars as $k => $v) {
-    $options[$k] = $v['name'];
-  }
-  $default = variable_get('registrar_api_default_registrar', '');
-  if ($default != '') {
-    $form['registrars']['#collapsed'] = TRUE;
-  }
-  $form['registrars']['default_registrar'] = array(
-    '#type' => 'select',
-    '#title' => t('Default'),
-    '#default_value' => $default,
-    '#options' => $options,
-  );
+  else {
+    $form['registrars'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Select registrars'),
+      '#description' => t('Select the registrar to use by default and optionally a specific registrar per TLD.'),
+      '#collapsible' => TRUE,
+    );
+    $options = array();
+    foreach ($registrars as $k => $v) {
+      $options[$k] = $v['name'];
+    }
+    $default = variable_get('registrar_api_default_registrar', '');
+    if ($default != '') {
+      $form['registrars']['#collapsed'] = TRUE;
+    }
+    $form['registrars']['default_registrar'] = array(
+      '#type' => 'select',
+      '#title' => t('Default'),
+      '#default_value' => $default,
+      '#options' => $options,
+    );
   
-  $form['registrars']['tld_registrar'] = array(
-    '#type' => 'item',
-    '#tree' => TRUE,
-  );
-  $options = array_merge(array('' => t('Default')), $options);
-  foreach ($tlds_enabled as $tld) {
-    $items = array(
-      'tld' => array('#value' => $tld),
-      'registrar' => array(
-        '#type' => 'select',
-        '#options' => $options,
-        '#default_value' => variable_get('registrar_api_registrar_'.$tld, ''),
-      ),
+    $form['registrars']['tld_registrar'] = array(
+      '#type' => 'item',
+      '#tree' => TRUE,
     );
-    $form['registrars']['tld_registrar'][$tld] = $items;
+    $options = array_merge(array('' => t('Default')), $options);
+    foreach ($tlds_enabled as $tld) {
+      $items = array(
+        'tld' => array('#value' => $tld),
+        'registrar' => array(
+          '#type' => 'select',
+          '#options' => $options,
+          '#default_value' => variable_get('registrar_api_registrar_'.$tld, ''),
+        ),
+      );
+      $form['registrars']['tld_registrar'][$tld] = $items;
+    }
   }
 
+  // Default nameservers.
   $form['nameservers'] = array(
     '#type' => 'fieldset',
     '#title' => t('Default nameservers'),
@@ -97,7 +103,8 @@ function registrar_api_settings_form() {
   if (!empty($nameservers)) {
     $form['nameservers']['#collapsed'] = TRUE;
   }
-  for ($i=0;$i<5;$i++) {
+  $total = count($nameservers) + 3;
+  for ($i=0; $i<$total; $i++) {
     $form['nameservers'][$i] = array(
       '#type' => 'textfield',
       '#default_value' => isset($nameservers[$i])?$nameservers[$i]:'',
@@ -158,12 +165,16 @@ function registrar_api_settings_form_submit($form, $form_state) {
 function registrar_api_settings_initialize_tlds($form, &$form_state) {
   $result = drupal_http_request(REGISTRAR_API_IANA_TLDS_URL);
   if ($result->code != 200) {
-    form_error($form['iana'], $result->status_message);
+    $msg = t('There was a problem trying to download the TLDs database: "!error"', array('!error' => $result->error));
+    form_error($form['iana'], $msg);
+  }
+  else {
+    $tlds = explode("\n", trim($result->data));
+    array_shift($tlds);
+    $tlds = drupal_map_assoc($tlds);
+    variable_set('registrar_api_iana_tlds', $tlds);
+    drupal_set_message('TLDs database imported succesfully.');
   }
-  $tlds = explode("\n", trim($result->data));
-  array_shift($tlds);
-  $tlds = drupal_map_assoc($tlds);
-  variable_set('registrar_api_iana_tlds', $tlds);
 }
 
 /**
