- more doc
- rename test functions
- fix some minor bug for code analysis