I'm not sure what you mean with at "proper Drupal library" ?