Major API update and simplification. More tests.
Migrate history on meta.