Fork API types.

All tests pass (for now...)  Rebasing this PR is a _pain_