Documentation and correction and code improve