Also add more documentation. (cherry picked from commit 6191c6b1) (cherry picked from commit 6fce273c)