Simplify API to simplify doctest.