Fix doc blocks and code style
Update api doc