diff --git a/servers/rest_server/includes/RESTServer.inc b/servers/rest_server/includes/RESTServer.inc
index 9e7f86c..c49ed6a 100755
--- a/servers/rest_server/includes/RESTServer.inc
+++ b/servers/rest_server/includes/RESTServer.inc
@@ -545,8 +545,13 @@ class RESTServer {
   }
 
   public static function parseYAML($handle) {
-    include_once _rest_server_get_spyc_location();
-    return Spyc::YAMLLoadString(self::contentFromStream($handle));
+    if (($library = libraries_load('spyc')) && !empty($library['loaded'])) {
+      return Spyc::YAMLLoadString(self::contentFromStream($handle));
+    }
+    else {
+      watchdog('REST Server', 'Spyc library not found!', array(), WATCHDOG_ERROR);
+      return array();
+    }
   }
 
   protected function responseFormatters($format = NULL) {
diff --git a/servers/rest_server/includes/rest_server.views.inc b/servers/rest_server/includes/rest_server.views.inc
index 30af154..8efa8e8 100644
--- a/servers/rest_server/includes/rest_server.views.inc
+++ b/servers/rest_server/includes/rest_server.views.inc
@@ -58,8 +58,13 @@ class RESTServerViewBuiltIn extends RESTServerView {
   }
 
   private function render_yaml($data) {
-    include_once _rest_server_get_spyc_location();
-    return Spyc::YAMLDump($data, 4, 60);
+    if (($library = libraries_load('spyc')) && !empty($library['loaded'])) {
+      return Spyc::YAMLDump($data, 4, 60);
+    }
+    else {
+      watchdog('REST Server', 'Spyc library not found!', array(), WATCHDOG_ERROR);
+      return array();
+    }
   }
 
   private function render_bencode($data) {
diff --git a/servers/rest_server/rest_server.api.php b/servers/rest_server/rest_server.api.php
index 2ed259e..43712bb 100644
--- a/servers/rest_server/rest_server.api.php
+++ b/servers/rest_server/rest_server.api.php
@@ -42,7 +42,7 @@ function hook_rest_server_response_formatters_alter(&$formatters) {
    */
 
   // Add a Yaml response format conditionally.
-  if (_rest_server_get_spyc_location() !== false) {
+  if (($library = libraries_load('spyc')) && !empty($library['loaded'])) {
     $formatters['yaml'] = array(
       'mime types' => array('text/plain', 'application/x-yaml', 'text/yaml'),
       'view' => 'RESTServerViewBuiltIn',
diff --git a/servers/rest_server/rest_server.install b/servers/rest_server/rest_server.install
index 8655596..c5fac1c 100644
--- a/servers/rest_server/rest_server.install
+++ b/servers/rest_server/rest_server.install
@@ -15,7 +15,7 @@ function rest_server_requirements($phase) {
   if ($phase == 'runtime') {
     module_load_include('module', 'rest_server');
     module_load_include('module', 'libraries');
-    if (_rest_server_get_spyc_location() === false) {
+    if (($library = libraries_load('spyc')) && !empty($library['loaded'])) {
       $requirements['rest_server'] = array(
         'description' => 'The spyc library is missing, thus YAML is disabled',
         'severity' => REQUIREMENT_INFO,
diff --git a/servers/rest_server/rest_server.module b/servers/rest_server/rest_server.module
index ea9f1fe..de9c2f6 100755
--- a/servers/rest_server/rest_server.module
+++ b/servers/rest_server/rest_server.module
@@ -56,7 +56,7 @@ function rest_server_request_parsers() {
       'text/xml' => 'RESTServer::parseXML',
     );
 
-    if (_rest_server_get_spyc_location() !== false) {
+    if (($library = libraries_load('spyc')) && !empty($library['loaded'])) {
       $parsers['application/x-yaml'] = 'RESTServer::parseYAML';
     }
 
@@ -112,7 +112,7 @@ function rest_server_response_formatters() {
       ),
     );
 
-    if(_rest_server_get_spyc_location() !== false) {
+    if(($library = libraries_load('spyc')) && !empty($library['loaded'])) {
       $formatters['yaml'] = array(
         'mime types' => array('text/plain', 'application/x-yaml', 'text/yaml'),
         'view' => 'RESTServerViewBuiltIn',
@@ -217,19 +217,22 @@ function rest_server_services_resources_alter(&$resources, $endpoint) {
 }
 
 /**
- * Return the location of the spyc library, if any.
- *
- * @return the location of the spyc library, if it exists; else return false.
+ * Implements hook_libraries_info().
+ * @note : Libraries 2.x
  */
-function _rest_server_get_spyc_location() {
-  if (function_exists('libraries_get_path')) {
-    $libraries_spyc_loc = libraries_get_path('spyc') . '/spyc.php';
-    if (file_exists($libraries_spyc_loc)) {
-      return $libraries_spyc_loc;
-    }
-  }
-
-  // Libraries not in use fall back to straight look up.
-  $services_spyc_loc = dirname(__FILE__) . '/lib/spyc.php';
-  return file_exists($services_spyc_loc) ? $services_spyc_loc : false;
-}
+function rest_server_libraries_info() {
+  $libraries['spyc'] = array(
+    'name' => 'Spyc (A simple YAML loader/dumper class for PHP)',
+    'vendor url' => 'https://code.google.com/p/spyc/',
+    'download url' => 'https://code.google.com/p/spyc/downloads/list',
+    'version arguments' => array(
+      'file' => 'spyc.php',
+      'pattern' => '@version\s+([0-9a-zA-Z\.-]+)@',
+      'lines' => 4
+    ),
+    'files' => array(
+      'php' => array('spyc.php'),
+    ),
+  );
+  return $libraries;
+}
\ No newline at end of file
