Annotate some APIs as @internal
Use stricter assertions where possible