New interface

A better spec for this library; much less magic.
Also going read-only for the time being.
Cut out a generic querying api.
All these changes simplify the library but also make it more flexible and easily extensible.
Almost all parts are tested.