Added support for libraries

Included test cases for coverage

As we discussed offline, this should probably be 1.1.0 (due to new features).