Migrate types to 'internal' package.

This will allow us to bake the implementation and API on master with normal development of the library.