Added support for libraries

Included test cases for coverage

As @omsmith suggested, let's not rev the version as part of this change.