Added a docment on the API. Fixed a few errors. A few more tests