More work on the api.