Tentative interface

The exported functions are tentatively the interface for other packages to use.  I've left a lot of TODOs / questions in the file, so please comment away.
Yeah, I think for now we just populate all resources found under a given handle.