Add nearly final public API. Some internals still missing. Stub near full API tests.