diff --git a/google_feedapi.module b/google_feedapi.module
index 1f523ba..a2cc2ff 100644
--- a/google_feedapi.module
+++ b/google_feedapi.module
@@ -129,19 +129,41 @@ function google_feedapi_theme() {
  * Implements hook_library().
  */
 function google_feedapi_library() {
-  return array(
-    // The theme function that our formatter uses:
-    'google-feeds' => array(
-      'title' => 'Google FeedAPI Integration',
-      'website' => "https://developers.google.com/feed/v1/devguide",
-      'version' => '1.1',
-      'js' => array(
-        drupal_get_path('module', 'google_feedapi') . '/theme/google_feedapi.js' => array(),
-      ),
-      'css' => array(
-        drupal_get_path('module', 'google_feedapi') . '/theme/google_feedapi.css' => array(),
-      ),
+  $libraries = array();
+
+  // Provides the external Google FeedAPI Integration library.
+  $url = 'https://www.google.com/jsapi?autoload=' . urlencode('{"modules" : [{"name" : "feeds","version" : "1"}]}');
+  $settings = array(
+    'type' => 'external',
+    'scope' => 'header',
+    'group' => JS_LIBRARY,
+    'weight' => -25,
+  );
+  $libraries['google_jsapi_feeds'] = array(
+    'title' => 'Google FeedAPI Integration',
+    'website' => "https://developers.google.com/feed/v1/devguide",
+    'version' => '1.1',
+    'js' => array(
+      $url => $settings,
     ),
   );
-}
 
+  // Provides the locally hosted Google FeedAPI Formatter library.
+  $path = drupal_get_path('module', 'google_feedapi');
+  $libraries['google_feedapi'] = array(
+    'title' => 'Google FeedAPI Formatter',
+    'website' => "https://drupal.org/project/google_feedapi",
+    'version' => '1.0',
+    'js' => array(
+      "$path/theme/google_feedapi.js" => array(),
+    ),
+    'css' => array(
+      "$path/theme/google_feedapi.css" => array(),
+    ),
+    'dependencies' => array(
+      array('google_feedapi', 'google_jsapi_feeds'),
+    ),
+  );
+
+  return $libraries;
+}
diff --git a/theme/google_feedapi.theme.inc b/theme/google_feedapi.theme.inc
index be70a7c..e2c7cac 100644
--- a/theme/google_feedapi.theme.inc
+++ b/theme/google_feedapi.theme.inc
@@ -37,18 +37,15 @@ function theme_google_feedapi_formatter_google_feedapi($info){
   return "<div id='{$feed_div_id}'></div>";
 }
 
-function _google_feedapi_load_common_feed_js(){
+/**
+ * Statically loads the common required javascript libraries.
+ */
+function _google_feedapi_load_common_feed_js() {
   static $common_js;
-  if (! isset($common_js)) {
-    $common_js = true;
-    drupal_add_js('https://www.google.com/jsapi?autoload=' . urlencode('{"modules" : [{"name" : "feeds","version" : "1"}]}'), array(
-      'type' => 'external',
-      'scope' => 'header',
-      'group' => JS_LIBRARY,
-      'weight' => - 25
-    ));
-
-    // Add required JavaScript and Stylesheets for the google feeds
-    drupal_add_library('google_feedapi', 'google-feeds');
+  if (!isset($common_js)) {
+    $common_js = TRUE;
+    // Adds this modules formatter behaviors, which depends on
+    // the external Google FeedAPI Integration files.
+    drupal_add_library('google_feedapi', 'google_feedapi');
   }
-}
\ No newline at end of file
+}
