diff --git a/RemoteStreamWrapperMediaBrowser.inc b/RemoteStreamWrapperMediaBrowser.inc
index 6d91710..5549d45 100644
--- a/RemoteStreamWrapperMediaBrowser.inc
+++ b/RemoteStreamWrapperMediaBrowser.inc
@@ -5,6 +5,12 @@
  * Media browser plugin for remote stream wrapper URLs.
  */
 
+// If the Media Browser plugin class does not exist, prevent the rest of this
+// file from being loaded.
+if (!class_exists('MediaBrowserPlugin')) {
+  return;
+}
+
 class RemoteStreamWrapperMediaBrowser extends MediaBrowserPlugin {
 
   public static function access($account = NULL) {
@@ -14,7 +20,7 @@ class RemoteStreamWrapperMediaBrowser extends MediaBrowserPlugin {
     return user_access('administer files', $account) || user_access('add media from remote urls', $account);
   }
 
-  function view() {
+  public function view() {
     return array(
       '#title' => t('Remote URL'),
       'form' => drupal_get_form('remote_stream_wrapper_file_add_form', $this->params),
diff --git a/remote_stream_wrapper.module b/remote_stream_wrapper.module
index d499832..71bce6d 100644
--- a/remote_stream_wrapper.module
+++ b/remote_stream_wrapper.module
@@ -199,17 +199,30 @@ function remote_stream_wrapper_file_create_by_uri($uri) {
   return $file;
 }
 
+function remote_stream_wrapper_file_uri_to_object($uri, $use_existing = TRUE) {
+  $file = FALSE;
+
+  if ($use_existing) {
+    $file = remote_stream_wrapper_file_load_by_uri($uri);
+  }
+
+  if (empty($file)) {
+    $file = remote_stream_wrapper_file_create_by_uri($uri);
+    $file->timestamp = REQUEST_TIME;
+    // This is gagged because some uris will not support it.
+    $file->filesize = @filesize($uri);
+  }
+
+  return $file;
+}
+
 /**
  * Implements hook_media_browser_plugin_info().
  */
 function remote_stream_wrapper_media_browser_plugin_info() {
   $plugins['remote_file'] = array(
     'title' => t('Remote URL'),
-    'handler' => array(
-      'path' => drupal_get_path('module', 'remote_stream_wrapper'),
-      'file' => 'RemoteStreamWrapperMediaBrowser.inc',
-      'class' => 'RemoteStreamWrapperMediaBrowser',
-    ),
+    'class' => 'RemoteStreamWrapperMediaBrowser',
     'access callback' => 'remote_stream_wrapper_media_browser_plugin_access',
     // Support for Media 1.x browser plugins
     '#title' => t('Remote URL'),
@@ -218,7 +231,7 @@ function remote_stream_wrapper_media_browser_plugin_info() {
 }
 
 function remote_stream_wrapper_media_browser_plugin_access() {
-  return RemoteStreamWrapperMediaBrowser::access();
+  return user_access('administer files') || user_access('add media from remote urls');
 }
 
 /**
@@ -226,7 +239,7 @@ function remote_stream_wrapper_media_browser_plugin_access() {
  */
 function remote_stream_wrapper_media_browser_plugin_view($plugin_name, $params) {
   if ($plugin_name == 'remote_file') {
-    if (user_access('administer files') || user_access('add media from remote urls')) {
+    if (remote_stream_wrapper_media_browser_plugin_access()) {
       $params += array('types' => array());
       $form = drupal_get_form('remote_stream_wrapper_file_add_form', $params);
       return array(
