Added support for libraries

Included test cases for coverage

Let's just use `id` for both apps and libs.  (Although we'll still need to support `appID` for a bit.)