Implement library() method and test
Fix up to meet Drupal standard