Add a few more functions to the runtime library for #101.

No functional changes.