Initial split of internal and external api types.

I thought you could only cast between types that were strictly related, but I guess not.  Huh.  That's just weird.