Added support for libraries

Included test cases for coverage

This looks like it just duplicates all the existing tests.  We can get the same coverage with less code/fewer tests.  The switch from `libID/appID` will help with this.