diff --git a/template.php b/template.php
index 8e911dd..6462f37 100644
--- a/template.php
+++ b/template.php
@@ -264,11 +264,34 @@ function icebusiness_html_head_alter(&$head) {
 function icebusiness_preprocess_page(&$variables) {
   // Get the entire main menu tree
   $main_menu_tree = menu_tree_all_data('main-menu');
-$variables['name']=''; 
+  $variables['name']='';
   // Add the rendered output to the $main_menu_expanded variable
   $main_menu_tree = menu_tree_all_data_with_active_trail('main-menu');
   $variables['main_menu_expanded'] = menu_tree_output($main_menu_tree);
   $variables['main_menu_tree'] = $main_menu_tree;
+  
+  // Add the slider.
+  if (theme_get_setting('use_slider')) {
+    $variables['page']['slider'] = array(
+      '#theme_wrappers' => array('container'),
+      '#attributes' => array('class' => 'content'),
+      'slideshow' => array(
+        '#theme_wrappers' => array('container'),
+        '#attributes' => array('class' => 'slideshow'),
+      ),
+    );
+
+    foreach (array('image1_path', 'image2_path', 'image3_path') as $image) {
+      if ($uri = theme_get_setting($image)) {
+       $variables['page']['slider']['slideshow'][$image] = array(
+          '#theme' => 'image',
+          '#path' => file_create_url($uri),
+          '#width' => 914,
+          '#height' => 290,
+        );
+      }
+    }
+  }
 }
 
 function menu_tree_all_data_with_active_trail($menu_name) {
diff --git a/templates/page.tpl.php b/templates/page.tpl.php
index 9c76102..ff9694d 100755
--- a/templates/page.tpl.php
+++ b/templates/page.tpl.php
@@ -121,32 +121,14 @@
         </div></div><!-- /.section, /#navigation -->
       <?php endif; ?><!-- /#navigation -->
       
-      <!-- *********** #slider ************ -->
-	  <?php   $sld = theme_get_setting('use_slider');
-	      if (($page['slider']) || $sld): ?>
-			   <div id="slider">
-			   <div id="slid_show">
-			   <?php if ($page['slider']): ?><?php print render($page['slider']); ?>
-			 <?php else: ?>
-					<div class="content">
-					<div class="slideshow">
-				     <?php  if (theme_get_setting('image1_path')): ?>
-					<img alt="slide1" title="slide1" height="290" width="914" src="<?php print file_create_url(theme_get_setting('image1_path')); ?> " />
-					<?php endif; ?> 
-					<?php  if (theme_get_setting('image2_path')): ?>
-					<img alt="slide1" title="slide1" height="290" width="914" src="<?php print file_create_url(theme_get_setting('image2_path')); ?> " />
-					<?php endif; ?> 
-					<?php  if (theme_get_setting('image3_path')): ?>
-					<img alt="slide1" title="slide1" height="290" width="914" src="<?php print file_create_url(theme_get_setting('image3_path')); ?> " />
-					<?php endif; ?> 
-				   </div> 
-					</div> 
-            <?php endif; ?> 
-	   </div><!-- slid_show -->
-	   </div><!-- slider -->
-	   <?php endif; ?> 
-	  
-	   <!-- *********** End #slider ************ -->
+    <?php if (!empty($page['slider'])): ?>
+      <div id="slider">
+        <div id="slid_show">
+          <?php print render($page['slider']); ?>
+        </div><!-- /#slid_show -->
+      </div><!-- /#slider -->
+    <?php endif; ?>
+
  <?php if ($page['tab_boxes']): ?>
  <div id="tabs-wrp"> <div class="tabs-bg"><?php print render($page['tab_boxes']); ?></div></div>
  <?php endif; ?>
diff --git a/theme-settings.php b/theme-settings.php
index 30c4d7a..6a3fd17 100644
--- a/theme-settings.php
+++ b/theme-settings.php
@@ -49,89 +49,147 @@
     '#description'   => t("Enter your blog Full Url."),
   );
 
-/************* slider function ***************************/
+  // Slider settings.
+  $slider_enabled = theme_get_setting('use_slider');
+  $public_path = variable_get('file_public_path', conf_path() . '/files');
 
   $form['slider'] = array(
     '#type' => 'fieldset',
     '#title' => t('Slider Images'),
-    '#description' => t("Please Upload your slider image.")
+    '#description' => t('Add your slider images. You may add up to 3 images.'),
+    '#collapsible' => TRUE,
+    '#collapsed' => !$slider_enabled,
   );
+
   $form['slider']['use_slider'] = array(
     '#type' => 'checkbox',
-    '#title' => t('Enable default slider.'),
-    '#default_value' =>  theme_get_setting('use_slider'),
-   '#description'=> 'Image Diemension : 914x290',
-  );  
+    '#title' => t('Enable the slider.'),
+    '#default_value' => $slider_enabled,
+  );
 
-   $form['slider']['image1_path'] = array(
+  $form['slider']['image1_path'] = array(
     '#type' => 'textfield',
-    '#title' => t('Path to slider image'), 
-   '#default_value' =>  base_path().file_stream_wrapper_get_instance_by_uri('public://')->getDirectoryPath().'/'.file_uri_target(theme_get_setting('image1_path')),
+    '#title' => t('Path to first slider image'),
+    '#default_value' => theme_get_setting('image1_path'),
+    '#description' => t('Enter path relative to !path.', array('!path' => $public_path)),
   );
 
-    $form['slider']['image_1_upload'] = array(
+  $form['slider']['image1_upload'] = array(
     '#type' => 'file',
-    '#title' => t('Upload your slider image'),
-   '#description'=> 'Image Diemension : 914x290',
+    '#title' => t('Or upload your first slider image'),
+    '#description'=> t('Image Diemension : 914x290'),
   );
-   $form['slider']['image2_path'] = array(
+
+  $form['slider']['image2_path'] = array(
     '#type' => 'textfield',
-    '#title' => t('Path to slider image'), 
-   '#default_value' =>  base_path().file_stream_wrapper_get_instance_by_uri('public://')->getDirectoryPath().'/'.file_uri_target(theme_get_setting('image2_path')),
+    '#title' => t('Path to second slider image'),
+    '#default_value' => theme_get_setting('image2_path'),
+    '#description' => t('Enter path relative to !path.', array('!path' => $public_path)),
   );
 
-    $form['slider']['image_2_upload'] = array(
+  $form['slider']['image2_upload'] = array(
     '#type' => 'file',
-    '#title' => t('Upload your slider image'),
-   '#description'=> 'Image Diemension : 914x290',
+    '#title' => t('Or upload your second slider image'),
+    '#description'=> t('Image Diemension : 914x290'),
   );
 
-$form['slider']['image3_path'] = array(
+  $form['slider']['image3_path'] = array(
     '#type' => 'textfield',
-    '#title' => t('Path to slider image'), 
-   '#default_value' =>  base_path().file_stream_wrapper_get_instance_by_uri('public://')->getDirectoryPath().'/'.file_uri_target(theme_get_setting('image3_path')),
+    '#title' => t('Path to third slider image'),
+    '#default_value' =>  theme_get_setting('image3_path'),
+    '#description' => t('Enter path relative to !path.', array('!path' => $public_path)),
   );
 
-    $form['slider']['image_3_upload'] = array(
+  $form['slider']['image3_upload'] = array(
     '#type' => 'file',
-    '#title' => t('Upload your slider image'),
-   '#description'=> 'Image Diemension : 914x290',
+    '#title' => t('Or upload your third slider image'),
+    '#description'=> t('Image Diemension : 914x290'),
   );
 
+  // Inject human-friendly values for slider image paths.
+  foreach (array('image1_path', 'image2_path', 'image3_path') as $field) {
+    if (isset($form['slider'][$field])) {
+      $element = &$form['slider'][$field];
+
+      // If path is a public:// URI, display the path relative to the files
+      // directory. Stream wrappers are not end-user friendly.
+      $original_path = $element['#default_value'];
+      $friendly_path = NULL;
+      if (file_uri_scheme($original_path) == 'public') {
+        $friendly_path = file_uri_target($original_path);
+        $element['#default_value'] = $friendly_path;
+      }
+    }
+  }
+
+  $form['#validate'][] = 'icebusiness_custom_settings_validate';
   $form['#submit'][] = 'icebusiness_custom_settings_submit';
  
   return $form;
 }
 
+/**
+ * Validate icebusness theme settings.
+ */
+function icebusiness_custom_settings_validate($form, &$form_state) {
+  $values = &$form_state['values'];
+
+  // Images must be 914x290.
+  $validators = array(
+    'file_validate_is_image' => array(),
+    'file_validate_image_resolution' => array(
+      'maximum_dimensions' => '914x290',
+      'minimum_dimensions' => '914x290',
+    ),
+  );
 
-function icebusiness_custom_settings_submit($form, &$form_state) {
-
-  // Check for a new uploaded file, and use that if available.
-  if ($file = file_save_upload('image_1_upload')) {
-    $parts = pathinfo($file->filename);
-    $destination = 'public://' . $parts['basename'];
-    $file->status = FILE_STATUS_PERMANENT;
-    if (file_copy($file, $destination, FILE_EXISTS_REPLACE)) {
-        $_POST['image1_path'] = $form_state['values']['image1_path'] = $destination;
-     }
+  // Handle slider uploads.
+  foreach (array('image1_upload', 'image2_upload', 'image3_upload') as $field) {
+    if ($file = file_save_upload($field, $validators)) {
+      // Image upload was attempted.
+      if ($file) {
+        // Put the temporary image in form_values so we can save it on submit.
+        $values[$field] = $file;
+      }
+      else {
+        // The upload failed.
+        form_set_error($field, t('The image could not be uploaded.'));
+      }
+    }
   }
-  if ($file = file_save_upload('image_2_upload')) {
-
-    $parts = pathinfo($file->filename);
-       $destination = 'public://' . $parts['basename'];
-    $file->status = FILE_STATUS_PERMANENT;
-    if (file_copy($file, $destination, FILE_EXISTS_REPLACE)) {
-        $_POST['image2_path'] = $form_state['values']['image2_path'] = $destination;
-     }
+
+  // Make sure the images exists if the user provided paths.
+  foreach (array('image1_path', 'image2_path', 'image3_path') as $field) {
+    if (!empty($values[$field])) {
+      $path = _system_theme_settings_validate_path($values[$field]);
+      if (!$path) {
+        form_set_error($field, t('The path is invalid.'));
+      }
+    }
   }
-  if ($file = file_save_upload('image_3_upload')) {
-
-    $parts = pathinfo($file->filename);
-        $destination = 'public://' . $parts['basename'];
-    $file->status = FILE_STATUS_PERMANENT;
-    if (file_copy($file, $destination, FILE_EXISTS_REPLACE)) {
-        $_POST['image3_path'] = $form_state['values']['image3_path'] = $destination;
-     }
+}
+
+/**
+ * Submit the icebusness theme settings.
+ */
+function icebusiness_custom_settings_submit($form, &$form_state) {
+  $values = &$form_state['values'];
+
+  // If the user uploaded new slider images, save it to a permanent location
+  // and change the image path setting.
+  foreach (array('image1', 'image2', 'image3') as $field) {
+    if ($file = $values[$field . '_upload']) {
+      unset($values[$field . '_upload']);
+      $filename = file_unmanaged_copy($file->uri);
+      $values[$field . '_path'] = $filename;
+    }
   }
 
+  // If the user entered paths relative to the system files directory, store a
+  // public:// URI so the theme system can handle it.
+  foreach (array('image1_path', 'image2_path', 'image3_path') as $field) {
+    if (!empty($values[$field])) {
+      $values[$field] = _system_theme_settings_validate_path($values[$field]);
+    }
+  }
 }
