Some work on the API. #36