Add prototype high-level API.
Simplify API a bit.