Fix some inconsistencies in the API and its usage.