UPD to the current state

And correction of errors.