Update/fix docs and type hints

Also remove a few superfluous newlines.

Change-Id: Ib02cb183a1e2f5f18e61fe4038dcb76f7a665f4e
Merge "Update/fix docs and type hints"