Remove unused local variables, update formatting and documentation

Change-Id: Ib17f5f05d6cc48ac448df0ea8515d570713df9b5
Merge "Remove unused local variables, update formatting and documentation"