runtime: Make methods opaque and provide an API