fixed issues in api, added examples and modified readme