Added support for libraries

Included test cases for coverage

We're deprecating this approach, so let's no include it in the docs anymore.