Merge pull request #200 from bakul/mk-c-api

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