Clean up public API for runtime and buildtime