First working draft of the API