Initial split of internal and external api types.

Done (although _you_ wrote that originally ;)