diff --git a/DropboxUploader.make b/DropboxUploader.make
deleted file mode 100644
index 7e5c6c7..0000000
--- a/DropboxUploader.make
+++ /dev/null
@@ -1,14 +0,0 @@
-; $Id$
-;
-; Dropbox Uploader makefile
-; ----------------
-; This makefile downloads the lastest version from Dropbox Uploader and 
-; places it sites/all/libraries/DropboxUploader.
-
-core = 7.x
-api = 2
-
-libraries[DropboxUploader][download][type] = "get"
-libraries[DropboxUploader][download][url] = "https://github.com/BenTheDesigner/Dropbox/archive/master.zip"
-libraries[DropboxUploader][directory_name] = "dropbox"
-libraries[DropboxUploader][destination] = "libraries"
\ No newline at end of file
diff --git a/backup_migrate_dropbox.info b/backup_migrate_dropbox.info
index 46a1c77..adf7976 100644
--- a/backup_migrate_dropbox.info
+++ b/backup_migrate_dropbox.info
@@ -2,5 +2,4 @@ name = Backup and Migrate Dropbox
 description = "Allows Back and Migrate to save the backup files to a dropbox.com account"
 core = 7.x
 dependencies[] = backup_migrate
-dependencies[] = libraries
 php = 5.3
diff --git a/backup_migrate_dropbox.install b/backup_migrate_dropbox.install
deleted file mode 100644
index 160d859..0000000
--- a/backup_migrate_dropbox.install
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/**
- * @file
- * Install file for Backup and Migrate DropBox.
- */
-
-/**
- * Implements hook_requirements().
- */
-function backup_migrate_dropbox_requirements($phase) {
-  $requirements = array();
-  $t = get_t();
-  if ($phase == 'install') {
-    if (!file_exists('sites/all/libraries/dropbox/Dropbox/API.php')) {
-      $requirements['dropbox'] = array(
-        'title' => $t('BenTheDesigner\'s Dropbox REST API'),
-        'value' => $t('Missing'),
-        'description' =>  $t(
-          'BenTheDesigner\'s Dropbox REST API library is missing, please download it from !link and place it at !directory',
-          array(
-            '!link' => 'https://github.com/BenTheDesigner/Dropbox',
-            '!directory' => 'sites/all/libraries/dropbox',
-          )
-        ),
-        'severity' => REQUIREMENT_ERROR,
-      );
-    }
-  }
-  return $requirements;
-}
-
-
diff --git a/backup_migrate_dropbox.module b/backup_migrate_dropbox.module
index 2a50447..e3f07f2 100644
--- a/backup_migrate_dropbox.module
+++ b/backup_migrate_dropbox.module
@@ -6,9 +6,9 @@
  */
 
 /**
- * Implements hook_backup_migrate_destination_subtypes().
+ * Implements hook_backup_migrate_destination_types().
  */
-function backup_migrate_dropbox_backup_migrate_destination_subtypes() {
+function backup_migrate_dropbox_backup_migrate_destination_types() {
   return array(
     'dropbox' => array(
       'type_name' => t('Dropbox'),
@@ -16,7 +16,6 @@ function backup_migrate_dropbox_backup_migrate_destination_subtypes() {
       'file' => drupal_get_path('module', 'backup_migrate_dropbox') . '/destinations.dropbox.inc',
       'class' => 'backup_migrate_destination_dropbox',
       'can_create' => TRUE,
-      'remote' => TRUE,
     ),
   );
 }
diff --git a/destinations.dropbox.inc b/destinations.dropbox.inc
index fa87033..219eeca 100644
--- a/destinations.dropbox.inc
+++ b/destinations.dropbox.inc
@@ -11,30 +11,129 @@
  * @ingroup backup_migrate_destinations
  */
 class backup_migrate_destination_dropbox extends backup_migrate_destination_remote {
-  var $supported_ops = array('scheduled backup', 'manual backup', 'remote backup');
+  var $supported_ops = array('scheduled backup', 'manual backup', 'remote backup', 'configure');
   var $dropbox = NULL;
 
   /**
    * Save to to the Dropbox destination.
    */
   function save_file($file, $settings) {
-    $dropbox = $this->dropbox_object();
     $filename = $file->file_info['filename'] . '.' . implode('.', $file->ext);
     $dest_filename = realpath(variable_get('file_temporary_path', '')) . '/' . $filename;
     rename($file->filepath(), $dest_filename);
 
-    try {
-      $handle = fopen($dest_filename, "r");
-      $put = $dropbox->putStream($handle, $filename);
-      fclose($handle);
-    } catch (Exception $e) {
-      watchdog(
-        'backup_migrate',
-        'There was a problem when we tried to save the file to Dropbox, the error message was: !error',
-        array('!error' => $e->getMessage()),
-        WATCHDOG_ERROR);
-      return FALSE;
+    $size = filesize($dest_filename);
+
+    // 25 MB limit on file transfer. This fits into the drupal minimum of 32M
+    // with some room for other page load data.
+    // TODO: min(php_memory_limit, dropbox_upload_limit[150M]) subtract 10M to get the max file size.
+    $max_file_size = 25 * pow(DRUPAL_KILOBYTE, 2); // Test with: 100 * DRUPAL_KILOBYTE;
+    if ($size > $max_file_size) {
+      // Muti-step upload.
+      $header = array();
+      $header[] = 'Content-type: application/octet-stream';
+      $header[] = 'Authorization: Bearer ' . $this->settings('token');
+      $header[] = 'Accept: application/json';
+
+      // Content
+      $file_handle = fopen($dest_filename, 'rb');
+      $content = fread($file_handle, $max_file_size);
+      $total_size = strlen($content);
+
+      $request = curl_init();
+      curl_setopt($request, CURLOPT_URL, 'https://content.dropboxapi.com/2/files/upload_session/start');
+      curl_setopt($request, CURLOPT_POST, 1);
+      curl_setopt($request, CURLOPT_HTTPHEADER, $header);
+      curl_setopt($request, CURLOPT_RETURNTRANSFER, TRUE);
+      curl_setopt($request, CURLOPT_POSTFIELDS, $content);
+      $result = json_decode(curl_exec($request), TRUE);
+      curl_close($request);
+      $session_id = $result['session_id'];
+
+
+      while (!feof($file_handle)) {
+        // Append.
+        $parameters = array(
+          'cursor' => array(
+            'session_id' => $session_id,
+            'offset' => $total_size,
+          ),
+        );
+
+        $header = array();
+        $header[] = 'Content-type: application/octet-stream';
+        $header[] = 'Authorization: Bearer ' . $this->settings('token');
+        $header[] = 'Dropbox-API-Arg: ' . json_encode($parameters);
+        $header[] = 'Accept: application/json';
+
+        // Get content.
+        $content = fread($file_handle, $max_file_size);
+        $total_size += strlen($content);
+
+        $request = curl_init();
+        curl_setopt($request, CURLOPT_URL, 'https://content.dropboxapi.com/2/files/upload_session/append_v2');
+        curl_setopt($request, CURLOPT_POST, 1);
+        curl_setopt($request, CURLOPT_HTTPHEADER, $header);
+        curl_setopt($request, CURLOPT_POSTFIELDS, $content);
+        curl_setopt($request, CURLOPT_RETURNTRANSFER, TRUE);
+        $result = curl_exec($request);
+        curl_close($request);
+      }
+
+      // Close.
+      $parameters = array(
+        'cursor' => array(
+          'session_id' => $session_id,
+          'offset' => $total_size,
+        ),
+        'commit' => array(
+          'path' => '/' . $this->dest_url['path'] . '/' . $filename,
+          'mode' => 'add',
+          'autorename' => TRUE,
+          'mute' => TRUE,
+        ),
+      );
+
+      $header = array();
+      $header[] = 'Content-type: application/octet-stream';
+      $header[] = 'Authorization: Bearer ' . $this->settings('token');
+      $header[] = 'Dropbox-API-Arg: ' . json_encode($parameters);
+      $header[] = 'Accept: application/json';
+
+      $request = curl_init();
+      curl_setopt($request, CURLOPT_URL, 'https://content.dropboxapi.com/2/files/upload_session/finish');
+      curl_setopt($request, CURLOPT_POST, 1);
+      curl_setopt($request, CURLOPT_HTTPHEADER, $header);
+      curl_setopt($request, CURLOPT_RETURNTRANSFER, TRUE);
+      $result = curl_exec($request);
+      curl_close($request);
+
+    }
+    else {
+      // Simple upload.
+      $parameters = array(
+        'path' => '/' . $this->dest_url['path'] . '/' . $filename,
+        'mode' => 'add',
+        'autorename' => TRUE,
+        'mute' => TRUE,
+      );
+
+      $header = array();
+      $header[] = 'Content-type: application/octet-stream';
+      $header[] = 'Authorization: Bearer ' . $this->settings('token');
+      $header[] = 'Dropbox-API-Arg: ' . json_encode($parameters);
+      $header[] = 'Accept: application/json';
+
+      $request = curl_init();
+      curl_setopt($request, CURLOPT_URL, 'https://content.dropboxapi.com/2/files/upload');
+      curl_setopt($request, CURLOPT_POST, 1);
+      curl_setopt($request, CURLOPT_HTTPHEADER, $header);
+      curl_setopt($request, CURLOPT_POSTFIELDS, file_get_contents($dest_filename));
+      curl_setopt($request, CURLOPT_RETURNTRANSFER, TRUE);
+      $result = curl_exec($request);
+      curl_close($request);
     }
+
     return $file;
   }
 
@@ -44,26 +143,21 @@ class backup_migrate_destination_dropbox extends backup_migrate_destination_remo
   function edit_form() {
     $form = parent::edit_form();
 
-    // TODO: add some help text here.
     $form['description'] = array(
       '#type' => 'markup',
       '#weight' => -999,
-      '#markup' => t('In order to use your DropBox account as a Backup and Migrate destination,
-        you must create a DropBox "App" and obtain your app credentials and enter them below.
-        <ol><li>Create a DropBox App by logging into your DropBox account and going to
-        <a href="https://www.dropbox.com/developers/apps">https://www.dropbox.com/developers/apps</a>
-        and clicking the button to "Create an app". Be sure to give your app a descriptive name,
-        as the name you give it will be part of the path within your DropBox folder. For example,
-        if you create an app called "kittens", then DropBox will create an DropBox/Apps/kittens
-        directory in your DropBox folder.</li>
-        <li>Once the app is created, take note of your app\'s "App key" and "App secret" and enter
-        both of them below.</li>
-        <li>You may also enter a "path" that will be used inside your app\'s folder. For example,
-        if you enter "fluffy/white" as your path, then backups will be placed in the
-        DropBox/Apps/kittens/fluffy/white/ directory.</li>
-        <li>Enter a 32-charater encryption key. We\'re not 100% sure if this is the best way to
-        handle this, but for now, it works.</li></ol>
-      '),
+      '#markup' => t('<p>In order to use your DropBox account as a Backup and Migrate destination,
+        you must create a DropBox App and obtain an application token and enter it below.
+        <ol>
+          <li>Create a DropBox App by logging into your DropBox account and going to
+              <a href="https://www.dropbox.com/developers/apps">https://www.dropbox.com/developers/apps</a>.</li>
+          <li>Click the button to "Create an app". Be sure to give your app a descriptive name,
+              as the name you give it will be part of the path within your DropBox folder. For example,
+              if you create an app called "kittens", then DropBox will create a DropBox/Apps/kittens
+              directory in your DropBox folder.</li>
+          <li>In the OAuth 2 section of your app settings you will see a button that says "Generate Access Token".
+              Click this button. Copy the entire token and paste it into the Token below.</li>
+        </ol></p>'),
     );
 
     $form['name']['#description'] = t('Enter a "friendly" name for this destination. Only appears as a descriptor in the Backup and Migrate administration screens.');
@@ -78,34 +172,32 @@ class backup_migrate_destination_dropbox extends backup_migrate_destination_remo
       '#value' => 'www.dropbox.com',
     );
 
-    $form['path'] = array(
-      '#type' => 'textfield',
-      '#title' => 'Path',
-      '#required' => FALSE,
-      '#description' => t('A relative folder inside your Dropbox App folder. For example, Dropbox/Apps/(your app name)/(whatever path you enter here).'),
-    );
+    $form['path']['#description'] = t('A relative folder inside your Dropbox App folder. For example, Dropbox/Apps/(your app name)/(whatever path you enter here). Do not you slashes before or after the path.');
+    $form['path']['#required'] = FALSE;
 
     $form['user'] = array(
-      '#type' => 'textfield',
-      '#title' => 'Dropbox App Key',
-      '#required' => TRUE,
-      '#description' => 'Enter the App key from Dropbox.com',
+      '#type' => 'value',
+      '#value' => '',
+    );
+
+    $form['old_password'] = array(
+      '#type' => 'value',
+      '#value' => '',
     );
 
     $form['pass'] = array(
-      '#type' => 'password',
-      '#title' => 'Dropbox App Secret',
-      '#required' => TRUE,
-      '#description' => 'Enter the App secret from Dropbox.com',
+      '#type' => 'value',
+      '#value' => '',
     );
 
-    // TODO: figure out if this is the best way to do this.
-    $form['settings']['encryption_key'] = array(
+    $form['settings']['token'] = array(
       '#type' => 'textfield',
-      '#title' => '32-byte encryption key',
+      '#title' => 'Dropbox App Token',
+      '#description' => 'Generated access token from your app. <b>Do not</b> use the secret key.',
       '#required' => TRUE,
-      '#description' => 'Enter a 32-byte (character) encryption key. TODO: figure out a better way to handle this.',
+      "#default_value" => $this->settings('token'),
     );
+    $form['settings']['#weight'] = 60;
 
     return $form;
   }
@@ -115,43 +207,9 @@ class backup_migrate_destination_dropbox extends backup_migrate_destination_remo
    */
   function edit_form_submit($form, &$form_state) {
     // Add the 32-byte encryption key to the settings for this destination.
-    $form_state['values']['settings']['encryption_key'] = $form_state['values']['encryption_key'];
+    $form_state['values']['settings']['token'] = $form_state['values']['token'];
     parent::edit_form_submit($form, $form_state);
   }
-
-
-  /**
-   * Create the DropBox object from BenTheDesigner's PHP API.
-   */
-  function dropbox_object() {
-    require_once 'sites/all/libraries/dropbox/Dropbox/API.php';
-    if (!$this->dropbox) {
-      $key    = $this->dest_url['user'];
-      $secret = $this->dest_url['pass'];
-
-      // Check whether to use HTTPS and set the callback URL
-      $protocol = (!empty($_SERVER['HTTPS'])) ? 'https' : 'http';
-      $callback = $protocol . '://' . $_SERVER['HTTP_HOST'] . request_uri();
-
-      // Register a simple autoload function
-      // TODO: figure out if this is the best way to do this.
-      spl_autoload_register(function($class) {
-        $class = str_replace('\\', '/', $class);
-        require_once(libraries_get_path('dropbox') . '/' . $class . '.php');
-      });
-
-      // Instantiate the Encrypter and storage objects
-      $encrypter = new \Dropbox\OAuth\Storage\Encrypter($this->settings('encryption_key'));
-
-      // Create the storage object, passing it the Encrypter object
-      $storage = new \Dropbox\OAuth\Storage\Session($encrypter);
-
-      // Create the consumer and API objects
-      $OAuth = new \Dropbox\OAuth\Consumer\Curl($key, $secret, $storage, $callback);
-      $this->dropbox = new \Dropbox\API($OAuth);
-    }
-    return $this->dropbox;
-  }
 }
 
 
