Fixes to documentation and code cleanup.

Change-Id: I6814bbbe31d690f871f08e9a84fc7145817dcfba