Develop

add API docs and some improvements and bug fix