diff --git a/includes/media.admin.inc b/includes/media.admin.inc
index 4cd76a3..464ed02 100644
--- a/includes/media.admin.inc
+++ b/includes/media.admin.inc
@@ -18,12 +18,12 @@ function media_admin_config_browser($form, &$form_state) {
     }
   }
 
-  $form['media__dialog_theme'] = array(
+  $form['media_dialog_theme'] = array(
     '#type' => 'select',
     '#title' => t('Media browser theme'),
     '#options' => $theme_options,
     '#description' => t("This theme will be used for all media related dialogs. It can be different from your site's theme because many site themes do not work well in the small windows which media uses."),
-    '#default_value' => variable_get('media__dialog_theme', ''),
+    '#default_value' => variable_get('media_dialog_theme', ''),
   );
 
   $form['array_filter'] = array(
@@ -40,8 +40,8 @@ function media_admin_config_browser($form, &$form_state) {
  * Form submission handler for media_admin_config_browser().
  */
 function media_admin_config_browser_pre_submit(&$form, &$form_state) {
-  if (!$form_state['values']['media__dialog_theme']) {
-    variable_del('media__dialog_theme');
-    unset($form_state['values']['media__dialog_theme']);
+  if (!$form_state['values']['media_dialog_theme']) {
+    variable_del('media_dialog_theme');
+    unset($form_state['values']['media_dialog_theme']);
   }
 }
diff --git a/includes/media.theme.inc b/includes/media.theme.inc
index 2a92a3b..9f2ff31 100644
--- a/includes/media.theme.inc
+++ b/includes/media.theme.inc
@@ -70,7 +70,7 @@ function template_preprocess_media_thumbnail(&$variables) {
  */
 function theme_media_formatter_large_icon($variables) {
   $file = $variables['file'];
-  $icon_dir = variable_get('media__icon_base_directory', 'public://media-icons') . '/' . variable_get('media__icon_set', 'default');
+  $icon_dir = variable_get('media_icon_base_directory', 'public://media-icons') . '/' . variable_get('media_icon_set', 'default');
   $icon = file_icon_path($file, $icon_dir);
   $variables['path'] = $icon;
 
diff --git a/media.install b/media.install
index 3a2b3eb..4e48efa 100644
--- a/media.install
+++ b/media.install
@@ -18,7 +18,7 @@ function media_install() {
   );
   // Only needed by sites that updated from Media 1.x.
   // @see media_entity_info_alter()
-  if (variable_get('media__show_deprecated_view_modes')) {
+  if (variable_get('media_show_deprecated_view_modes')) {
     $default_image_styles['media_original'] = '';
   }
 
@@ -41,10 +41,10 @@ function media_install() {
 
   // Make sure that we set the icon base directory variable if it is not
   // already set.
-  $base = variable_get('media__icon_base_directory', NULL);
+  $base = variable_get('media_icon_base_directory', NULL);
   if (!isset($base)) {
     $default_base = 'public://media-icons';
-    variable_set('media__icon_base_directory', $default_base);
+    variable_set('media_icon_base_directory', $default_base);
   }
   try {
     _media_install_copy_icons();
@@ -58,12 +58,12 @@ function media_install() {
  * Copy the media file icons to files directory for use with image styles.
  */
 function _media_install_copy_icons() {
-  $destination = variable_get('media__icon_base_directory', 'public://media-icons') . '/' . variable_get('media__icon_set', 'default');
+  $destination = variable_get('media_icon_base_directory', 'public://media-icons') . '/' . variable_get('media_icon_set', 'default');
   if (!file_prepare_directory($destination, FILE_CREATE_DIRECTORY)) {
     throw new Exception("Unable to create directory $destination.");
   }
   // @todo If we ever add another default icon set, this should copy all images from one directory up.
-  $source = drupal_get_path('module', 'media') . '/images/icons/' . variable_get('media__icon_set', 'default');
+  $source = drupal_get_path('module', 'media') . '/images/icons/' . variable_get('media_icon_set', 'default');
   $files = file_scan_directory($source, '/.*\.(png|jpg)$/');
   foreach ($files as $file) {
     $result = file_unmanaged_copy($file->uri, $destination, FILE_EXISTS_REPLACE);
@@ -78,19 +78,19 @@ function _media_install_copy_icons() {
  */
 function media_uninstall() {
   // Remove variables.
-  variable_del('media__wysiwyg_title');
-  variable_del('media__wysiwyg_icon_title');
-  variable_del('media__wysiwyg_default_view_mode');
-  variable_del('media__wysiwyg_upload_directory');
-  variable_del('media__wysiwyg_allowed_types');
-  variable_del('media__wysiwyg_allowed_attributes');
-  variable_del('media__wysiwyg_browser_plugins');
-  variable_del('media__dialog_theme');
-  variable_del('media__import_batch_size');
-  variable_del('media__fromurl_supported_schemes');
-  variable_del('media__icon_base_directory');
-  variable_del('media__icon_set');
-  variable_del('media__show_deprecated_view_modes');
+  variable_del('media_wysiwyg_title');
+  variable_del('media_wysiwyg_icon_title');
+  variable_del('media_wysiwyg_default_view_mode');
+  variable_del('media_wysiwyg_upload_directory');
+  variable_del('media_wysiwyg_allowed_types');
+  variable_del('media_wysiwyg_allowed_attributes');
+  variable_del('media_wysiwyg_browser_plugins');
+  variable_del('media_dialog_theme');
+  variable_del('media_import_batch_size');
+  variable_del('media_fromurl_supported_schemes');
+  variable_del('media_icon_base_directory');
+  variable_del('media_icon_set');
+  variable_del('media_show_deprecated_view_modes');
 }
 
 /**
@@ -1110,3 +1110,24 @@ function media_update_7223() {
   variable_del('media__browser_pager_limit');
   variable_del('media__browser_viewtype_default');
 }
+
+/**
+ * Rename variables, removing variable namespace.
+ */
+function media_update_7224() {
+  // Create an array of variables sans 'media' prefix.
+  $variables = array('wysiwyg_title', 'wysiwyg_icon_title', 'wysiwyg_default_view_mode', 'wysiwyg_upload_directory', 'wysiwyg_allowed_types', 'wysiwyg_allowed_attributes', 'wysiwyg_browser_plugins', 'dialog_theme', 'import_batch_size', 'fromurl_supported_schemes', 'icon_base_directory', 'icon_set', 'show_deprecated_view_modes');
+
+  foreach ($variables as $variable) {
+    // Find the value of the old variable.
+    $value = variable_get('media__' . $variable);
+
+    // Port the value of the variable if it was set.
+    if (!is_null($value)) {
+      variable_set('media_' . $variable, $value);
+    }
+
+    // Remove the old variable.
+    variable_del('media__' . $variable);
+  }
+}
diff --git a/media.module b/media.module
index 59c3e01..2510141 100644
--- a/media.module
+++ b/media.module
@@ -65,7 +65,7 @@ function media_entity_info_alter(&$entity_info) {
   // For sites that updated from Media 1.x, continue to provide these deprecated
   // view modes.
   // @see http://drupal.org/node/1051090
-  if (variable_get('media__show_deprecated_view_modes', FALSE)) {
+  if (variable_get('media_show_deprecated_view_modes', FALSE)) {
     $entity_info['file']['view modes'] += array(
       'media_link' => array(
         'label' => t('Link'),
@@ -183,7 +183,7 @@ function media_admin_paths() {
 
   // If the media browser theme is set to the admin theme, ensure it gets set
   // as an admin path as well.
-  $dialog_theme = variable_get('media__dialog_theme', '');
+  $dialog_theme = variable_get('media_dialog_theme', '');
   if (empty($dialog_theme) || $dialog_theme == variable_get('admin_theme')) {
     $paths['media/browser'] = TRUE;
     $paths['media/browser/*'] = TRUE;
@@ -453,7 +453,7 @@ function media_library() {
  * will default to the administration theme, unless set otherwise.
  */
 function media_dialog_get_theme_name() {
-  return variable_get('media__dialog_theme', variable_get('admin_theme'));
+  return variable_get('media_dialog_theme', variable_get('admin_theme'));
 }
 
 /**
diff --git a/modules/media_bulk_upload/includes/media_bulk_upload.admin.inc b/modules/media_bulk_upload/includes/media_bulk_upload.admin.inc
index 6c71d47..70055ac 100644
--- a/modules/media_bulk_upload/includes/media_bulk_upload.admin.inc
+++ b/modules/media_bulk_upload/includes/media_bulk_upload.admin.inc
@@ -114,7 +114,7 @@ function media_bulk_upload_import_batch_import_files($files, &$context) {
   $files =& $context['sandbox']['files'];
 
   // Take a cut of files.  Let's do 10 at a time.
-  $import_batch_size = variable_get('media__import_batch_size', 20);
+  $import_batch_size = variable_get('media_import_batch_size', 20);
   $length = (count($files) > $import_batch_size) ? $import_batch_size : count($files);
   $to_process = array_splice($files, 0, $length);
   $image_in_message = '';
diff --git a/modules/media_internet/media_internet.module b/modules/media_internet/media_internet.module
index 15418e6..6015e2b 100644
--- a/modules/media_internet/media_internet.module
+++ b/modules/media_internet/media_internet.module
@@ -139,7 +139,7 @@ class MediaInternetFileHandler extends MediaInternetBaseHandler {
 
   public function claim($embedCode) {
     // Claim only valid URLs using a supported scheme.
-    if (!valid_url($embedCode, TRUE) || !in_array(file_uri_scheme($embedCode), variable_get('media__fromurl_supported_schemes', array('http', 'https', 'ftp', 'smb', 'ftps')))) {
+    if (!valid_url($embedCode, TRUE) || !in_array(file_uri_scheme($embedCode), variable_get('media_fromurl_supported_schemes', array('http', 'https', 'ftp', 'smb', 'ftps')))) {
       return FALSE;
     }
 
diff --git a/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc b/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc
index 5ec8656..ba6e280 100644
--- a/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc
+++ b/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc
@@ -79,7 +79,7 @@ function media_wysiwyg_token_to_markup($match, $wysiwyg = FALSE) {
 
     // Ensure a valid view mode is being requested.
     if (!isset($tag_info['view_mode'])) {
-      $tag_info['view_mode'] = variable_get('media__wysiwyg_default_view_mode', 'full');
+      $tag_info['view_mode'] = variable_get('media_wysiwyg_default_view_mode', 'full');
     }
     elseif ($tag_info['view_mode'] != 'default') {
       $file_entity_info = entity_get_info('file');
@@ -119,7 +119,7 @@ function media_wysiwyg_token_to_markup($match, $wysiwyg = FALSE) {
     $fields = media_wysiwyg_filter_field_parser($tag_info);
 
     $attributes = is_array($tag_info['attributes']) ? $tag_info['attributes'] : array();
-    $attribute_whitelist = variable_get('media__wysiwyg_allowed_attributes', _media_wysiwyg_wysiwyg_allowed_attributes_default());
+    $attribute_whitelist = variable_get('media_wysiwyg_allowed_attributes', _media_wysiwyg_wysiwyg_allowed_attributes_default());
     $settings['attributes'] = array_intersect_key($attributes, array_flip($attribute_whitelist));
     $settings['fields'] = $fields;
 
@@ -390,7 +390,7 @@ function media_wysiwyg_format_form($form, $form_state, $file) {
   }
 
   // Allow for overrides to the display format.
-  $default_view_mode = is_array($query_fields) && isset($query_fields['format']) ? $query_fields['format'] : variable_get('media__wysiwyg_default_view_mode', 'full');
+  $default_view_mode = is_array($query_fields) && isset($query_fields['format']) ? $query_fields['format'] : variable_get('media_wysiwyg_default_view_mode', 'full');
   if (!isset($formats[$default_view_mode])) {
     $default_view_mode = key($formats);
   }
diff --git a/modules/media_wysiwyg/media_wysiwyg.module b/modules/media_wysiwyg/media_wysiwyg.module
index d969851..50c5ab6 100644
--- a/modules/media_wysiwyg/media_wysiwyg.module
+++ b/modules/media_wysiwyg/media_wysiwyg.module
@@ -91,41 +91,41 @@ function media_wysiwyg_form_media_admin_config_browser_alter(&$form, &$form_stat
     '#collapsible' => TRUE,
     '#collapsed' => FALSE,
   );
-  $form['wysiwyg']['media__wysiwyg_browser_plugins'] = array(
+  $form['wysiwyg']['media_wysiwyg_browser_plugins'] = array(
     '#type' => 'checkboxes',
     '#title' => t('Enabled browser plugins'),
     '#options' => array(),
     '#required' => FALSE,
-    '#default_value' => variable_get('media__wysiwyg_browser_plugins', array()),
+    '#default_value' => variable_get('media_wysiwyg_browser_plugins', array()),
     '#description' => t('If no plugins are selected, they will all be available.'),
   );
 
   $plugins = media_get_browser_plugin_info();
 
   foreach ($plugins as $key => $plugin) {
-    $form['wysiwyg']['media__wysiwyg_browser_plugins']['#options'][$key] = !empty($plugin['title']) ? $plugin['title'] : $key;
+    $form['wysiwyg']['media_wysiwyg_browser_plugins']['#options'][$key] = !empty($plugin['title']) ? $plugin['title'] : $key;
   }
 
-  $form['wysiwyg']['media__wysiwyg_upload_directory'] = array(
+  $form['wysiwyg']['media_wysiwyg_upload_directory'] = array(
     '#type' => 'textfield',
     '#title' => t("File directory for uploaded media"),
-    '#default_value' => variable_get('media__wysiwyg_upload_directory', ''),
+    '#default_value' => variable_get('media_wysiwyg_upload_directory', ''),
     '#description' => t('Optional subdirectory within the upload destination where files will be stored. Do not include preceding or trailing slashes.'),
   );
 
   if (module_exists('token')) {
-    $form['wysiwyg']['media__wysiwyg_upload_directory']['#description'] .= t('This field supports tokens.');
+    $form['wysiwyg']['media_wysiwyg_upload_directory']['#description'] .= t('This field supports tokens.');
     $form['wysiwyg']['tokens'] = array(
       '#theme' => 'token_tree',
       '#dialog' => TRUE,
     );
   }
 
-  $form['wysiwyg']['media__wysiwyg_allowed_types'] = array(
+  $form['wysiwyg']['media_wysiwyg_allowed_types'] = array(
     '#type' => 'checkboxes',
     '#title' => t('Allowed types in WYSIWYG'),
     '#options' => file_entity_type_get_names(),
-    '#default_value' => variable_get('media__wysiwyg_allowed_types', array('audio', 'image', 'video', 'document')),
+    '#default_value' => variable_get('media_wysiwyg_allowed_types', array('audio', 'image', 'video', 'document')),
   );
 
   $form['#submit'][] = 'media_wysiwyg_admin_config_browser_pre_submit';
@@ -135,10 +135,10 @@ function media_wysiwyg_form_media_admin_config_browser_alter(&$form, &$form_stat
  * Manipulate values before form is submitted.
  */
 function media_wysiwyg_admin_config_browser_pre_submit(&$form, &$form_state) {
-  $wysiwyg_browser_plugins = array_unique(array_values($form_state['values']['media__wysiwyg_browser_plugins']));
+  $wysiwyg_browser_plugins = array_unique(array_values($form_state['values']['media_wysiwyg_browser_plugins']));
   if (empty($wysiwyg_browser_plugins[0])) {
-    variable_del('media__wysiwyg_browser_plugins');
-    unset($form_state['values']['media__wysiwyg_browser_plugins']);
+    variable_del('media_wysiwyg_browser_plugins');
+    unset($form_state['values']['media_wysiwyg_browser_plugins']);
   }
 }
 
diff --git a/modules/media_wysiwyg/wysiwyg_plugins/media.inc b/modules/media_wysiwyg/wysiwyg_plugins/media.inc
index 55f96bc..55d7b2d 100644
--- a/modules/media_wysiwyg/wysiwyg_plugins/media.inc
+++ b/modules/media_wysiwyg/wysiwyg_plugins/media.inc
@@ -20,11 +20,11 @@ function media_wysiwyg_media_plugin() {
 
   // Plugin definition.
   $plugins['media'] = array(
-    'title' => variable_get('media__wysiwyg_title', t('Media browser')),
+    'title' => variable_get('media_wysiwyg_title', t('Media browser')),
     'vendor url' => 'http://drupal.org/project/media',
     'icon path' => drupal_get_path('module', 'media_wysiwyg') . '/images',
     'icon file' => 'wysiwyg-media.gif',
-    'icon title' => variable_get('media__wysiwyg_icon_title', t('Add media')),
+    'icon title' => variable_get('media_wysiwyg_icon_title', t('Add media')),
     // @todo: move this to the plugin directory for the wysiwyg plugin.
     'js path' => drupal_get_path('module', 'media_wysiwyg') . '/js',
     'js file' => 'wysiwyg-media.js',
@@ -32,9 +32,9 @@ function media_wysiwyg_media_plugin() {
     'css file' => 'media_wysiwyg.css',
     'settings' => array(
       'global' => array(
-        'enabledPlugins' => variable_get('media__wysiwyg_browser_plugins', array()),
-        'file_directory' => variable_get('media__wysiwyg_upload_directory', ''),
-        'types' => variable_get('media__wysiwyg_allowed_types', array('audio', 'image', 'video', 'document')),
+        'enabledPlugins' => variable_get('media_wysiwyg_browser_plugins', array()),
+        'file_directory' => variable_get('media_wysiwyg_upload_directory', ''),
+        'types' => variable_get('media_wysiwyg_allowed_types', array('audio', 'image', 'video', 'document')),
         'id' => 'media_wysiwyg',
       ),
     ),
@@ -68,6 +68,6 @@ function media_wysiwyg_include_browser_js() {
     }
   }
   // Add wysiwyg-specific settings.
-  $settings = array('wysiwyg_allowed_attributes' => variable_get('media__wysiwyg_allowed_attributes', _media_wysiwyg_wysiwyg_allowed_attributes_default()));
+  $settings = array('wysiwyg_allowed_attributes' => variable_get('media_wysiwyg_allowed_attributes', _media_wysiwyg_wysiwyg_allowed_attributes_default()));
   drupal_add_js(array('media' => $settings), 'setting');
 }
diff --git a/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.module b/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.module
index b60b875..5ca39b8 100644
--- a/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.module
+++ b/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.module
@@ -96,7 +96,7 @@ function media_wysiwyg_view_mode_form_alter(&$form, $form_state, $form_id)  {
     case 'media_wysiwyg_format_form':
       $file = $form['#media'];
 
-      $default_view_mode = variable_get('media__wysiwyg_default_view_mode', 'full');
+      $default_view_mode = variable_get('media_wysiwyg_default_view_mode', 'full');
 
       $view_mode = !empty($form_state['values']['format']) ? $form_state['values']['format'] : $default_view_mode;
 
