update doc and fix various inconsistency