Updated the API

I have updated the API to be a bit more complete and to include a couple of comments.