Update formatting and docs

Also remove some unneeded else{} statements and reverse if/else if that
reduces indentation.

Change-Id: I1f7bd26119850fc944fbe84ae78bdd95cafc7bbb
Merge "Update formatting and docs"