Cleaned up variable/type order in docs.

* A few other minor doc cleanups and obvious type hints.

Change-Id: I454fad0c1942068b4f3632ebd1b605bfbb9dfe7c
Merge "Cleaned up variable/type order in docs."