diff --git a/stage_file_proxy.install b/stage_file_proxy.install
index e69de29..d892825 100644
--- a/stage_file_proxy.install
+++ b/stage_file_proxy.install
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Implementation of hook_uninstall().
+ */
+function stage_file_proxy_uninstall() {
+  // Delete normal variables.
+  variable_del('stage_file_proxy_origin');
+  variable_del('stage_file_proxy_use_imagecache_root');
+  variable_del('stage_file_proxy_hotlink');
+  variable_del('stage_file_proxy_origin_dir');
+  variable_del('stage_file_proxy_sslversion');
+}
\ No newline at end of file
diff --git a/stage_file_proxy.module b/stage_file_proxy.module
index 6f6b189..57deb1c 100644
--- a/stage_file_proxy.module
+++ b/stage_file_proxy.module
@@ -1,4 +1,113 @@
 <?php
+
+/**
+ * Implements hook_permission().
+ */
+function stage_file_proxy_permission() {
+  return array(
+    'administer stage_file_proxy settings' => array(
+      'title' => t('Administer Stage File Proxy module'),
+      'description' => t('Perform administration tasks for the Stage File Proxy module.'),
+    ),
+  );
+}
+
+/**
+ * Implements hook_menu().
+ */
+function stage_file_proxy_menu() {
+  $items = array();
+
+  $items['admin/config/system/stage_file_proxy'] = array(
+    'title' => 'Stage File Proxy settings',
+    'description' => 'Administrative interface for the Stage File Proxy module',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('stage_file_proxy_admin'),
+    'access arguments' => array('administer stage_file_proxy settings'),
+    'type' => MENU_NORMAL_ITEM,
+   );
+
+  return $items;
+}
+
+function stage_file_proxy_admin() {
+  $form = array();
+
+  $form['stage_file_proxy_origin'] = array(
+    '#type' => 'textfield',
+    '#title' => t('The origin website.'),
+    '#default_value' => variable_get('stage_file_proxy_origin', ''),
+    '#description' => t('The origin website. For example: \'http://example.com\' with no trailing slash.
+      If the site is using HTTP Basic Authentication (the browser popup for username and password) you can 
+      embed those in the url. Be sure to URL encode any special characters:<br/><br/>For example, setting a user 
+      name of "myusername" and password as, "letme&in" the configuration would be the following: <br/><br/>
+      \'http://myusername:letme%26in@example.com\';'),
+    '#required' => FALSE,
+  );
+
+  $form['stage_file_proxy_origin_dir'] = array(
+    '#type' => 'textfield',
+    '#title' => t('The origin directory.'),
+    '#default_value' => variable_get('stage_file_proxy_origin_dir', variable_get('file_public_path', conf_path() . '/files')),
+    '#description' => t('If this is set then Stage File Proxy will use a different path for the remote 
+      files. This is useful for multisite installations where the sites directory contains different names 
+      for each url. If this is not set, it defaults to the same path as the local site.'),
+    '#required' => FALSE,
+  );
+
+  $form['stage_file_proxy_use_imagecache_root'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Imagecache Root.'),
+    '#default_value' => variable_get('stage_file_proxy_use_imagecache_root', TRUE),
+    '#description' => t("If this is true (default) then Stage File Proxy will look for /imagecache/ in 
+      the URL and determine the original file and request that rather than the
+      processed file, then send a header to the browser to refresh the image and let
+      imagecache handle it. This will speed up future imagecache requests for the
+      same original file."),
+    '#required' => FALSE,
+  );
+
+  $form['stage_file_proxy_hotlink'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Hotlink.'),
+    '#default_value' => variable_get('stage_file_proxy_hotlink', FALSE),
+    '#description' => t("If this is true then Stage File Proxy will not transfer the remote file to the
+      local machine, it will just serve a 301 to the remote file and let the origin webserver handle it."),
+    '#required' => FALSE,
+  );
+
+  $form['stage_file_proxy_sslversion'] = array(
+    '#type' => 'textfield',
+    '#title' => t('SSL Version.'),
+    '#default_value' => variable_get('stage_file_proxy_sslversion', 3),
+    '#description' => t('CURL will try to figure out which ssl version to use, but if it fails to do that 
+      properly it can lead to getting an empty file and a 0 status code. The default is 3 which seems 
+      relatively common, but if you get 0 byte files you can try changing it to 2.'),
+    '#size' => 2,
+    '#maxlength' => 2,
+    '#required' => FALSE,
+  );
+
+  return system_settings_form($form);
+}
+
+function stage_file_proxy_admin_validate($form, &$form_state) {
+  $origin = $form_state['values']['stage_file_proxy_origin'];
+  $sslversion = $form_state['values']['stage_file_proxy_sslversion'];
+
+  if (!empty($origin) && filter_var($origin, FILTER_VALIDATE_URL) === FALSE) {
+    form_set_error('stage_file_proxy_origin', 'Origin needs to be a valid URL.');
+  }
+
+  if (!empty($origin) && substr($origin, -1) === '/') {
+    form_set_error('stage_file_proxy_origin', 'Origin URL cannot end in slash.');
+  }
+
+  if (!is_numeric($sslversion)) {
+    form_set_error('stage_file_proxy_sslversion', 'You must enter a number for the SSL version.');
+  }
+}
+
 /**
  * Implements hook_init().
  * Intercepts certain requests and attempts to hotlink/download the remote
