Added most of the API.