Added support for libraries

Included test cases for coverage

This should still be `1.0.1` (it was `1.0.0` before you merged in the latest from `master`).