Bugs Fix and Documentation Improve

A lot of bugs fix and documentation improvements