More document changes

More document changes and code fixes